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
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             g...@greenie.muc.de
fax: +49-89-35655025                        g...@net.informatik.tu-muenchen.de

Attachment: pgp920FmKqEBb.pgp
Description: PGP signature

Reply via email to