diff options
author | David Sommerseth <dazo@eurephia.org> | 2015-01-08 20:24:18 +0100 |
---|---|---|
committer | David Sommerseth <dazo@eurephia.org> | 2015-01-08 20:26:13 +0100 |
commit | e869f5257bf9cfb1b6a7fdc84aeebada88f39854 (patch) | |
tree | 441601e7ea4d071d724bb2027a202617b5815710 /plugin/eurephia.c | |
parent | 56c654a93a451099a3121ff74efac34dd31f7cdf (diff) | |
download | eurephia-e869f5257bf9cfb1b6a7fdc84aeebada88f39854.tar.gz eurephia-e869f5257bf9cfb1b6a7fdc84aeebada88f39854.tar.xz eurephia-e869f5257bf9cfb1b6a7fdc84aeebada88f39854.zip |
plugin: Don't treat not found sessions in eurephinalearn_address() as a failure
This function is called also with IP adresses from networks behind clients, and
eurephia doesn't really need to process them.
Signed-off-by: David Sommerseth <dazo@eurephia.org>
(cherry picked from commit 31193a9d4f764bd54e00fc9e277c98319f198acd)
Diffstat (limited to 'plugin/eurephia.c')
-rw-r--r-- | plugin/eurephia.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin/eurephia.c b/plugin/eurephia.c index d21b80c..961b083 100644 --- a/plugin/eurephia.c +++ b/plugin/eurephia.c @@ -673,6 +673,10 @@ int eurephia_learn_address(eurephiaCTX *ctx, const char *mode, const char *clien eurephia_log(ctx, LOG_CRITICAL, 0, "No firewall destination defined in the config."); } + // FIXME: Figure out a way to differentiate IP addresses from VPN clients + // and IP adresses behind clients. Only the former needs to be + // processed by eurephia. + // In TUN mode, if a client reconnects quickly after a disconnect, // OpenVPN re-uses the session for this and just sends an update // call to LEARN_ADDRESS. As eurephia in TUN mode treats disconnects @@ -743,7 +747,7 @@ int eurephia_learn_address(eurephiaCTX *ctx, const char *mode, const char *clien } if( session == NULL ) { DEBUG(ctx, 25, "[learn-address] Untracked IP address: %s", clientaddr); - ret = 0; + ret = 1; /* Return success, as this isn't a failure in eurephia */ goto exit; } |