Am 09.07.14 22:39, schrieb Gert Doering: > Hi, > > On Tue, Jul 08, 2014 at 11:21:41AM +0200, Arne Schwabe wrote: >> --- a/src/openvpn/forward.c >> +++ b/src/openvpn/forward.c >> @@ -1018,6 +1018,8 @@ process_ip_header (struct context *c, unsigned int >> flags, struct buffer *buf) >> if (!c->options.passtos) >> flags &= ~PIPV4_PASSTOS; >> #endif >> + if (!c->options.client_nat) >> + flags &= ~PIPV4_CLIENT_NAT; >> if (!c->options.route_gateway_via_dhcp) >> flags &= ~PIPV4_EXTRACT_DHCP_ROUTER; >> > This... > >> @@ -1046,14 +1050,12 @@ process_ip_header (struct context *c, unsigned int >> flags, struct buffer *buf) >> if (flags & PIP_MSSFIX) >> mss_fixup_ipv4 (&ipbuf, MTU_TO_MSS (TUN_MTU_SIZE_DYNAMIC >> (&c->c2.frame))); >> >> -#ifdef ENABLE_CLIENT_NAT >> /* possibly do NAT on packet */ >> if ((flags & PIPV4_CLIENT_NAT) && c->options.client_nat) > ... sort of obsoletes this c->options.client_nat check, right? > > (I'm not sure I understand why it was done the way it is, but if you > do the first change, maybe just get rid of the second bit of the > condition here...) > > The rest is quite straightforward de-#ifdef-ing, which I like :) > > gert
That is actually a bugfix that "slipped" into the patch, but yes the second part is kind of duplicated. See alos the discussion on Message-ID: <53584132.4030...@openvpn.net> and the mail before that. We probablly really should commit a fix for this stuff otherwise it pops up every 6 months or so. Arne
signature.asc
Description: OpenPGP digital signature