Fix pool logging when IPv6 is not enabled
PATCH 1/1 Fix pool logging when IPv6 is not enabled
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I'm running the master branch (commit 330baf2aee70b35) on a site where IPv6 tunnelling is not enabled. I found some odd IPv6 addresses in the log file when clients connected. Attached is a patch solving this issue. It's basically a bogus message, and nothing seems to be pushed to the client.
This site is now running with this patch applied, and it behaves better.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAk8Ra18ACgkQDC186MBRfrqEEgCghBVhGlZdYNtejPP8Gx3A9gXL IEUAn35XkgcXuWmnjvAokf6NivrdtIma
=tG4S
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 14/01/12 12:47, David Sommerseth wrote:
| | Hi, | | I'm running the master branch (commit 330baf2aee70b35) on a site where IPv6 | tunnelling is not enabled. I found some odd IPv6 addresses in the log file | when clients connected. Attached is a patch solving this issue. It's | basically a bogus message, and nothing seems to be pushed to the client. | | This site is now running with this patch applied, and it behaves better. |
New improvement, now even with an attachment ... duh! ;-)
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAk8RbIYACgkQDC186MBRfrreXgCdGNPaFkQ7Fk0PBixv73t4JXpR E2kAnRut4h8V0/3SoFcCTty6WjXhC5IC
=mghf
-----END PGP SIGNATURE-----
From 7e05a5b08d2a6a6d2017de2e12c36294b8aa5326 Mon Sep 17 00:00:00 2001
From: David Sommerseth <[email protected]...>
Date: Sat, 14 Jan 2012 12:34:59 +0100
Subject: [PATCH] Fix pool logging when IPv6 is not enabled
If IPv6 tunnelling is not enabled, a bogus IPv6 address would be printed in the log, like this:
MULTI_sva: pool returned IPv4=10.8.0.4, IPv6=2180:8:2100:0:d4b4:f11d:18bf:2f00
It turns out that the remote_ipv6 buffer was not cleared. Added an extra check to also replace a "IPv6=::" log message with information that the IPv6 feature is disabled in these cases.
--- multi.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
multi.c +5 -2
@@ -1307,6 +1307,7 @@ multi_select_virtual_addr (struct multi_context *m, struct multi_instance *mi)if (!mi->context.options.duplicate_cn) cn =tls_common_name (mi->context.c2.tls_multi, true); +CLEAR (remote_ipv6); mi->vaddr_handle =ifconfig_pool_acquire (m->ifconfig_pool, &local, &remote, &remote_ipv6, cn);if (mi->vaddr_handle >=0 ) {
@@ -1314,8 +1315,10 @@ multi_select_virtual_addr (struct multi_context *m, struct multi_instance *mi)const int tunnel_topology =TUNNEL_TOPOLOGY (mi->context.c1.tuntap);msg (M_INFO ,"MULTI_sva: pool returned IPv4=%s, IPv6=%s" , -print_in_addr_t ( remote,0 , &gc ), -print_in6_addr ( remote_ipv6,0 , &gc ) ); +print_in_addr_t ( remote,0 , &gc ), + (mi->context.options.ifconfig_ipv6_pool_defined + ?print_in6_addr ( remote_ipv6,0 , &gc ) + :"(Not enabled)" ) );/* set push_ifconfig_remote_netmask from pool ifconfig address(es) */ mi->context.c2.push_ifconfig_local = remote;
Signature · 1 line
1.7.3.4
Hi,
Quoted 6 lines · David Sommerseth
| I'm running the master branch (commit
330baf2aee70b35) on a site where IPv6
| tunnelling is not enabled. I found some odd IPv6 addresses in the log file
| when clients connected. Attached is a patch solving this issue. It's | basically a bogus message, and nothing seems to be pushed to the client.
ACK, thanks.
(I wouldn't dream of running OpenVPN without IPv6, but it's quite obviously a useful test case to do so :-) ).
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 9 lines · David Sommerseth
On 14/01/12 12:47, David Sommerseth wrote: | | Hi, | | I'm running the master branch (commit
330baf2aee70b35) on a site where IPv6 | tunnelling is not enabled. I found some odd IPv6 addresses in the log file | when clients connected. Attached is a patch solving this issue. It's | basically a bogus message, and nothing seems to be pushed to the client. | | This site is now running with this patch applied, and it behaves better. |New improvement, now even with an attachment ... duh! ;-)
Applied to master branch on -testing and -stable trees.
commit cb383dc3bc161c1e4ea6b535097e0f64a725e081
Author: David Sommerseth <[email protected]...> Date: Sat Jan 14 12:34:59 2012 +0100
Fix pool logging when IPv6 is not enabled
Signed-off-by: David Sommerseth <[email protected]...>
Acked-by: Gert Doering <[email protected]...>kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk8T6TUACgkQDC186MBRfrpxSwCfSsuiqs4T4QNYrnnQQLgB3Y2g IX0AoKnZOVQ5grJzMkvBExBfK8jqMBFL
=u/la
-----END PGP SIGNATURE-----