Ticket #269: 0003-Minor-fix-to-process_ipv4_header-so-that-any-combina.patch

File 0003-Minor-fix-to-process_ipv4_header-so-that-any-combina.patch, 1.8 KB (added by Gert Döring, 8 years ago)

patch r8219 adjusted to current git tree and IPv6 stuff in there

  • src/openvpn/forward.c

    From 367b5a1f6ab41e014a0f6cfb839d4a2bfa282147 Mon Sep 17 00:00:00 2001
    From: James Yonan <james@openvpn.net>
    Date: Thu, 20 Sep 2012 22:32:12 +0200
    Subject: [PATCH 3/3] Minor fix to process_ipv4_header so that any combination
     of options can be defined.
    
    OpenVPN SVN r8219, slightly adapted for conflicts brought in by
    commit f0e8997a874a89b3 (IPv6 MSSFIX implementation).
    
    Signed-off-by: Gert Doering <gert@greenie.muc.de>
    ---
     src/openvpn/forward.c | 6 +-----
     src/openvpn/forward.h | 4 +++-
     2 files changed, 4 insertions(+), 6 deletions(-)
    
    diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
    index 447b86d..8f1f1e5 100644
    a b process_ip_header (struct context *c, unsigned int flags, struct buffer *buf) 
    10261026       * The --passtos and --mssfix options require
    10271027       * us to examine the IPv4 header.
    10281028       */
    1029 #if PASSTOS_CAPABILITY
    1030       if (flags & (PIPV4_PASSTOS|PIP_MSSFIX))
    1031 #else
    1032       if (flags & PIP_MSSFIX)
    1033 #endif
     1029      if (flags & PIP_OPT_MASK)
    10341030        {
    10351031          struct buffer ipbuf = *buf;
    10361032          if (is_ipv4 (TUNNEL_TYPE (c->c1.tuntap), &ipbuf))
  • src/openvpn/forward.h

    diff --git a/src/openvpn/forward.h b/src/openvpn/forward.h
    index 1830a00..0ece01e 100644
    a b bool send_control_channel_string (struct context *c, const char *str, int msglev 
    229229
    230230#define PIPV4_PASSTOS         (1<<0)
    231231#define PIP_MSSFIX            (1<<1)         /* v4 and v6 */
    232 #define PIPV4_OUTGOING        (1<<2)
    233232#define PIPV4_EXTRACT_DHCP_ROUTER (1<<3)
    234233#define PIPV4_CLIENT_NAT      (1<<4)
     234#define PIP_OPT_MASK          0xFFFF         /* all possible options for */
     235                                             /* process_ip_header() */
     236#define PIPV4_OUTGOING        (1<<16)
    235237
    236238void process_ip_header (struct context *c, unsigned int flags, struct buffer *buf);
    237239