Ticket #269: 8219.patch

File 8219.patch, 1.4 KB (added by Samuli Seppänen, 9 years ago)

Git-am -style patch extracted from SVN using svnrev2git.py

  • forward.c

    From: James Yonan <james@openvpn.net>
    Date: gio, 20 set 2012 23:32:12 +0300
    Subject: [PATCH] Minor fix to process_ipv4_header so that any combination of options
    
    can be defined.
    
    ---
    
    a b  
    10291029       * The --passtos and --mssfix options require
    10301030       * us to examine the IPv4 header.
    10311031       */
    1032 #if PASSTOS_CAPABILITY
    1033       if (flags & (PIPV4_PASSTOS|PIPV4_MSSFIX))
    1034 #else
    1035       if (flags & PIPV4_MSSFIX)
    1036 #endif
     1032      if (flags & PIPV4_OPT_MASK)
    10371033        {
    1038           struct buffer ipbuf = *buf;
    1039           if (is_ipv4 (TUNNEL_TYPE (c->c1.tuntap), &ipbuf))
     1034          if (is_ipv4 (TUNNEL_TYPE (c->c1.tuntap), buf))
    10401035            {
     1036              struct buffer ipbuf = *buf;
    10411037#if PASSTOS_CAPABILITY
    10421038              /* extract TOS from IP header */
    10431039              if (flags & PIPV4_PASSTOS)
  • forward.h

    a b  
    7474
    7575#define PIPV4_PASSTOS         (1<<0)
    7676#define PIPV4_MSSFIX          (1<<1)
    77 #define PIPV4_OUTGOING        (1<<2)
    7877#define PIPV4_EXTRACT_DHCP_ROUTER (1<<3)
    7978#define PIPV4_CLIENT_NAT      (1<<4)
     79#define PIPV4_OPT_MASK        0xFFFF
    8080
     81#define PIPV4_OUTGOING        (1<<16)
     82
    8183void process_ipv4_header (struct context *c, unsigned int flags, struct buffer *buf);
    8284
    8385#if P2MP