Correctly state the default dhcp server address in man page
PATCH 1/1 Correctly state the default dhcp server address in man page
Also correct the default ifconfig-pool end in docs and comments
--- doc/openvpn.8 | 4 ++-- src/openvpn/helper.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
doc/openvpn.8 +2 -2
@@ -2793,7 +2793,7 @@ expands as follows: if dev tap OR (dev tun AND topology == subnet): ifconfig 10.8.0.1 255.255.255.0 if !nopool: - ifconfig\-pool 10.8.0.2 10.8.0.254 255.255.255.0 + ifconfig\-pool 10.8.0.2 10.8.0.253 255.255.255.0 push "route\-gateway 10.8.0.1" if route\-gateway unset: route\-gateway 10.8.0.2
@@ -5594,7 +5594,7 @@ virtual DHCP server address. In .B \-\-dev tun mode, OpenVPN will cause the DHCP server to masquerade as if it were coming from the remote endpoint. The optional offset parameter is -an integer which is > \-256 and < 256 and which defaults to 0. +an integer which is > \-256 and < 256 and which defaults to -1. If offset is positive, the DHCP server will masquerade as the IP address at network address + offset. If offset is negative, the DHCP server will masquerade as the IP
src/openvpn/helper.c +1 -1
@@ -228,7 +228,7 @@ helper_client_server (struct options *o)* if tap OR (tun AND topology == subnet): * ifconfig 10.8.0.1 255.255.255.0 * if !nopool: -* ifconfig-pool 10.8.0.2 10.8.0.254 255.255.255.0 +* ifconfig-pool 10.8.0.2 10.8.0.253 255.255.255.0 * push "route-gateway 10.8.0.1" * if route-gateway unset: * route-gateway 10.8.0.2
Signature · 1 line
2.1.4
Hi,
Quoted 4 lines · Selva Nair
Also correct the default ifconfig-pool end in docs and comments
Signed-off-by Selva Nair <[email protected]...>
Not critical for 2.4, but posted it anyway because I was bitten by this again today: a new server with the last address .254 included the pool and forgot to push "--ip-win32 dynamic 0" --- windows clients can't handle .254 without that.
Selva
HI,
Quoted 7 lines · Selva Nair
Also correct the default ifconfig-pool end in docs and comments
Signed-off-by Selva Nair <[email protected]...>--- doc/openvpn.8 | 4 ++-- src/openvpn/helper.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
"why oh why"...
options.c:
o->tuntap_options.dhcp_masq_offset = 0; /* use network address as intern
tun.c:
/* At what IP address should the DHCP server masquerade at? */
if (tt->type == DEV_TYPE_TUN)
{
if (tt->topology == TOP_SUBNET)
{
if (tt->options.dhcp_masq_custom_offset)
ep[2] = dhcp_masq_addr (tt->local, tt->remote_netmask, tt->optio
ns.dhcp_masq_offset);
else
ep[2] = dhcp_masq_addr (tt->local, tt->remote_netmask, -1);
}"if no offset was specified, do not use the default setting of the variable, as the code suggest, but use -1 instead, which conflicts with both man page and code documentation"
But it goes on...
else
{
ASSERT (tt->type == DEV_TYPE_TAP);
ep[2] = dhcp_masq_addr (tt->local, tt->adapter_netmask, tt->options.dh
cp_masq_custom_offset ? tt->options.dhcp_masq_offset : 0);
}"except if it's a TAP device, in which case we actually *do* use the same value that this was initialized to, namely, 0".
I'm going to merge your documentation patch now, for 2.4.0 and 2.3.14, but for git master we should revisit this piece of <deleted>, get rid of "dhcp_masq_custom_offset" *and* make it default to 0 for both tun and tap... (since there is no difference that the windows side of things can see, if .0 works in tap mode, I can't see a reason why it would not work in windows' "tun" mode).
... or why we can't just use route-gateway for this...
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]...Hi,
Quoted 7 lines · Gert Doering
I'm going to merge your documentation patch now, for 2.4.0 and 2.3.14, but for git master we should revisit this piece of <deleted>, get rid of "
dhcp_masq_custom_offset" *and* make it default to 0 for both tun and tap... (since there is no difference that the windows side of things can see, if .0 works in tap mode, I can't see a reason why it would not work in windows' "tun" mode).
Yes, it does work in tun mode (easy to test just use offset 0 on command line)
I had posted a patch ( a year ago?) which sets the offset to 0. I did not remove the offset variable though it makes sense to get rid of it... Anyway the patch never got any attention :)
Thanks,
Selva
Hi,
Quoted 2 lines · Selva Nair
Yes, it does work in tun mode (easy to test just use offset 0 on command line)
Good :-)
Quoted 3 lines
I had posted a patch ( a year ago?) which sets the offset to 0. I did not remove the offset variable though it makes sense to get rid of it... Anyway the patch never got any attention :)
Apologies. I've seen the patch but got distracted.
We should get this fixed after 2.4 release in master (along with lots of other "now we go clean this up and refactor everything" :-) ).
For "fixing strange parts of openvpn" patches, please feel free to remind me every now and then that feedback is missing. I'm not extending this to "all sorts of patches" right now, though, as I can't make promises for the "big change patch series"...
Anyway: Samuli, how's patchwork proceeding? Speaking of "tracking patches".
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]...Il 07/12/2016 10:29, Gert Doering ha scritto:
Quoted 17 lines
Hi,
Quoted 2 lines · Selva Nair
Yes, it does work in tun mode (easy to test just use offset 0 on command line)
Good :-)
Quoted 3 lines
I had posted a patch ( a year ago?) which sets the offset to 0. I did not remove the offset variable though it makes sense to get rid of it... Anyway the patch never got any attention :)
Apologies. I've seen the patch but got distracted.
We should get this fixed after 2.4 release in master (along with lots of other "now we go clean this up and refactor everything" :-) ).
Quoted 6 lines
For "fixing strange parts of openvpn" patches, please feel free to remind me every now and then that feedback is missing. I'm not extending this to "all sorts of patches" right now, though, as I can't make promises for the "big change patch series"...
Anyway: Samuli, how's patchwork proceeding? Speaking of "tracking patches".
Patchwork has not progressed one bit. I've been busy pushing out OpenVPN releases on weekly basis, plus reviewing and testing Selva's and Ilya's commits to openvpn-build and openvpn-gui which those releases need :).
I will get back to patchwork once things calm down on the OpenVPN release front.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
ACK. Because it makes documentation match code.
(This particular part of code needs to get some sanity, but this won't happen before 2.4.0)
Your patch has been applied to the master and release/2.3 branch.
commit 251cc8f2042cc0cb8281230f7fb33f2cdec5b809 (master) commit a1b9e4c1ac4ea1ebccf485ba2eaeb9745ef88cae (release/2.3)
Author: Selva Nair Date: Fri Dec 2 14:42:09 2016 -0500
Correctly state the default dhcp server address in man page
Signed-off-by: Selva Nair <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg13387.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering