Opttion "client-nat" not recognised
Hi,
today, I was working with an old config which uses --client-nat I upgraded that particular client to git-master for testing and discovered that git-master currently does not support --client-nat
This config works perfectly with older versions,
details follow:
GIT-master versions which --client-nat does *not* work:
- dated 2015Nov25 (My first test)
- dated 2015Aug02 (Another clone I had available)
- dated 2015Dec11 (make sure i was not going more nuts! than usual)
GIT-mater versions which --client-nat *does* work:
- dated 2015Jun12
Official version which --client-nat *does* work:
Linux-Mint: Ubuntu 14.04.1
- OpenVPN 2.3.2 x86_64-pc-linux-gnu <..> built on Dec 1 2014
If you prefer this reported on trac please let me know.
CLIENT LOG FILE WORKING:
Fri Dec 11 18:36:50 2015 us=948077 OpenVPN 2.3_git 12.June.2015 [git:master/60fd44e501f20024+] x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH] [IPv 6] built on Dec 11 2015
Fri Dec 11 18:36:50 2015 us=948133 library versions: OpenSSL 1.0.1f 6 Jan 2014, LZO 2.06
<..>
Fri Dec 11 18:36:54 2015 us=118430 PUSH: Received control message: 'PUSH_REPLY,ifconfig-ipv6 2001:db8:0:123::101/64 2001:db8:0:123::86,route-gateway 10.234.64.86,topology subnet,explicit-exit-notify 3,ping 10,ping-restart 30,tun-ipv6,client-nat snat 10.1.101.0 255.255.255.0 10.201.101.0 255.255.255.0,client-nat dnat 10.201.101.0 255.255.255.0 10.1.101.0 255.255.255.0,setenv-safe client_dynamic 1,ifconfig 10.234.64.101 255.255.255.0,peer-id 0'
Fri Dec 11 18:36:54 2015 us=118553 Option 'explicit-exit-notify' in [PUSH-OPTIONS]:4 is ignored by previous <connection> blocks Fri Dec 11 18:36:54 2015 us=118691 OPTIONS IMPORT: timers and/or timeouts modified
Fri Dec 11 18:36:54 2015 us=118726 OPTIONS IMPORT: explicit notify parm(s) modified
Fri Dec 11 18:36:54 2015 us=118764 OPTIONS IMPORT: --ifconfig/up options modified
Fri Dec 11 18:36:54 2015 us=118798 OPTIONS IMPORT: route options modified
Fri Dec 11 18:36:54 2015 us=118832 OPTIONS IMPORT: route-related options modified
Fri Dec 11 18:36:54 2015 us=118867 OPTIONS IMPORT: environment modified
Fri Dec 11 18:36:54 2015 us=118904 OPTIONS IMPORT: peer-id set
Fri Dec 11 18:36:54 2015 us=118938 OPTIONS IMPORT: adjusting link_mtu to 1605
Fri Dec 11 18:36:54 2015 us=119710 TUN/TAP device tun23464 opened
Fri Dec 11 18:36:54 2015 us=119802 TUN/TAP TX queue length set to 100
Fri Dec 11 18:36:54 2015 us=119873 do_ifconfig, tt->ipv6=1, tt->did_ifconfig_ipv6_setup=1
Fri Dec 11 18:36:54 2015 us=119971 /sbin/ifconfig tun23464 10.234.64.101 netmask 255.255.255.0 mtu 1500 broadcast 10.234.64.255 Fri Dec 11 18:36:54 2015 us=125237 /sbin/ifconfig tun23464 add 2001:db8:0:123::101/64
Fri Dec 11 18:36:54 2015 us=134693 Initialization Sequence Completed
CLIENT LOG FILE *NOT* WORKING:
Fri Dec 11 19:08:10 2015 us=348536 OpenVPN 2.3_git [git:master/4baec3ee10b8d682] x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH] [IPv6] built on De c 11 2015
Fri Dec 11 19:08:10 2015 us=348583 library versions: OpenSSL 1.0.1f 6 Jan 2014, LZO 2.06
<..>
Fri Dec 11 19:08:12 2015 us=645088 PUSH: Received control message: 'PUSH_REPLY,ifconfig-ipv6 2001:db8:0:123::101/64 2001:db8:0:123::86,route-gateway 10.234.64.86,topology subnet,explicit-exit-notify 3,ping 10,ping-restart 30,tun-ipv6,client-nat snat 10.1.101.0 255.255.255.0 10.201.101.0 255.255.255.0,client-nat dnat 10.201.101.0 255.255.255.0 10.1.101.0 255.255.255.0,setenv-safe client_dynamic 1,ifconfig 10.234.64.101 255.255.255.0,peer-id 0'
Fri Dec 11 19:08:12 2015 us=645213 Option 'explicit-exit-notify' in [PUSH-OPTIONS]:4 is ignored by previous <connection> blocks Fri Dec 11 19:08:12 2015 us=645281 Options error: Unrecognized option or missing or extra parameter(s) in [PUSH-OPTIONS]:8: client-nat (2.3_git) Fri Dec 11 19:08:12 2015 us=645328 Options error: Unrecognized option or missing or extra parameter(s) in [PUSH-OPTIONS]:9: client-nat (2.3_git) Fri Dec 11 19:08:12 2015 us=645418 OPTIONS IMPORT: timers and/or timeouts modified
Fri Dec 11 19:08:12 2015 us=645445 OPTIONS IMPORT: explicit notify parm(s) modified
Fri Dec 11 19:08:12 2015 us=645470 OPTIONS IMPORT: --ifconfig/up options modified
Fri Dec 11 19:08:12 2015 us=645494 OPTIONS IMPORT: route-related options modified
Fri Dec 11 19:08:12 2015 us=645519 OPTIONS IMPORT: environment modified
Fri Dec 11 19:08:12 2015 us=645543 OPTIONS IMPORT: peer-id set
Fri Dec 11 19:08:12 2015 us=645568 OPTIONS IMPORT: adjusting link_mtu to 1605
Fri Dec 11 19:08:12 2015 us=646219 TUN/TAP device tun23464 opened
Fri Dec 11 19:08:12 2015 us=646324 TUN/TAP TX queue length set to 100
Fri Dec 11 19:08:12 2015 us=646403 do_ifconfig, tt->ipv6=1, tt->did_ifconfig_ipv6_setup=1
Fri Dec 11 19:08:12 2015 us=646506 /sbin/ifconfig tun23464 10.234.64.101 netmask 255.255.255.0 mtu 1500 broadcast 10.234.64.255 Fri Dec 11 19:08:12 2015 us=663984 /sbin/ifconfig tun23464 add 2001:db8:0:123::101/64
Fri Dec 11 19:08:12 2015 us=669056 Initialization Sequence Completed
Hi,
Quoted 3 lines · On Fri, Dec 11, 2015 at 07:35:18PM -0000, [email protected]... wrote:
today, I was working with an old config which uses --client-nat I upgraded that particular client to git-master for testing and discovered that git-master currently does not support --client-nat
[..]
Quoted 7 lines
Fri Dec 11 19:08:12 2015 us=645088 PUSH: Received control message:
'PUSH_REPLY,ifconfig-ipv6 2001:db8:0:123::101/64 2001:db8:0:123::86,route-gateway 10.234.64.86,topology subnet,explicit-exit-notify 3,ping 10,ping-restart 30,tun-ipv6,client-nat
snat 10.1.101.0 255.255.255.0 10.201.101.0 255.255.255.0,client-nat dnat
10.201.101.0 255.255.255.0 10.1.101.0 255.255.255.0,setenv-safeclient_dynamic1,ifconfig 10.234.64.101 255.255.255.0,peer-id 0'
According to the (slightly confusing, admittedly) man page entry, the way you are calling the option is not correct, and as such, git master will refuse the lines. "client-nat" has *four* arguments, not *five*.
This is backed by the 2.3 and git master code...
2.3:
#ifdef ENABLE_CLIENT_NAT
else if (streq (p[0], "client-nat") && p[1] && p[2] && p[3] && p[4])
{
VERIFY_PERMISSION (OPT_P_ROUTE);
cnol_check_alloc (options);
add_client_nat_to_option_list(options->client_nat, p[1], p[2], p[3], p[4],
msglevel);
}#endif
(so, argument 5 is silently ignored)
git master:
else if (streq (p[0], "client-nat") && p[1] && p[2] && p[3] && p[4] && !p[5])
{
VERIFY_PERMISSION (OPT_P_ROUTE);
cnol_check_alloc (options);
add_client_nat_to_option_list(options->client_nat, p[1], p[2], p[3], p[4], msglevel);
}"if a 5th argument is given, refuse this option".
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]...----- Original Message ----- From: "Gert Doering" <[email protected]...>
To: <[email protected]...>
Cc: <[email protected]>
Sent: Friday, December 11, 2015 7:38 PM
Subject: Re: [Openvpn-devel] Opttion "client-nat" not recognised
Quoted 2 lines
According to the (slightly confusing, admittedly) man page entry, the way you are calling the option is not correct, and as such, git master will refuse the lines. "client-nat" has *four* arguments, not *five*.
Is it possible to provide some kind of example ?
For those of us not familiar with C ..
Thanks
Hi,
Quoted 7 lines · On Fri, Dec 11, 2015 at 08:06:45PM -0000, [email protected]... wrote:
Quoted 4 lines
According to the (slightly confusing, admittedly) man page entry, the way you are calling the option is not correct, and as such, git master will refuse the lines. "client-nat" has *four* arguments, not *five*.
Is it possible to provide some kind of example ?
For those of us not familiar with C ..
I have no idea what these options *do*, but the code says "four arguments have to be there" and the git master code says "four arguments have to be there, and if a fifth is given, it is a syntax error".
So just leave off the last argument - it was silently ignored all along.
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]...----- Original Message ----- From: "Gert Doering" <[email protected]...>
To: <[email protected]...>
Cc: "Gert Doering" <[email protected]...>; <[email protected]>
Sent: Friday, December 11, 2015 8:08 PM
Subject: Re: [Openvpn-devel] Opttion "client-nat" not recognised
Quoted 5 lines
the code says "four arguments
have to be there" and the git master code says "four arguments have to be there, and if a fifth is given, it is a syntax error".So just leave off the last argument - it was silently ignored all along.
Very well, I have dropped the second mask argument and the push is at least accepted now. Checking logs at --verb 6 for details .. Thanks.