diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2012-09-13 17:59:40 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2012-09-13 17:59:40 +0200 |
commit | b036940698442e61d7623702a7835af4d4e8e76a (patch) | |
tree | 1435a4cc44c23d75ab465d0ada9e2b1734206e2a | |
parent | 2ebf7e3a91fee5663ead92474ec6fca7908cb78d (diff) | |
download | eurephia-b036940698442e61d7623702a7835af4d4e8e76a.tar.gz eurephia-b036940698442e61d7623702a7835af4d4e8e76a.tar.xz eurephia-b036940698442e61d7623702a7835af4d4e8e76a.zip |
Fix bug with TUN mode disconnects being logged wrongly.
This fixes a bug which appeared with newer OpenVPN versions, where
the OPENVPN_PLUGIN_LEARN_ADDRESS would be called in the end - also
in tun mode. And with the clean-up in session seed, in regards to
the netmask not being part of the session seed, this little code
made things worse. So lets get rid of it!
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
-rw-r--r-- | plugin/eurephia-auth.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/plugin/eurephia-auth.c b/plugin/eurephia-auth.c index e0669fa..8c018e2 100644 --- a/plugin/eurephia-auth.c +++ b/plugin/eurephia-auth.c @@ -273,14 +273,6 @@ OPENVPN_EXPORT int openvpn_plugin_func_v1(openvpn_plugin_handle_t handle, case OPENVPN_PLUGIN_CLIENT_DISCONNECT: // Register logout result = eurephia_disconnect(ctx, envp); - if( (result == 1) && (ctx->tuntype == tuntype_TUN) ) { - // If running in TUN mode, OPENVPN_PLUGIN_LEARN_ADDRESS will not be called, - // so we fake this call here instead. - char *vpnipaddr = GETENV_POOLIPADDR(ctx, envp); - - result = (vpnipaddr ? eurephia_learn_address(ctx, "delete", vpnipaddr, envp) : 0); - free_nullsafe(ctx, vpnipaddr); - } break; case OPENVPN_PLUGIN_LEARN_ADDRESS: // Log IP address, MAC address and update firewall |