[PATCH] Updated mangle5hooks patch for mangle table

Brad Chapman kakadu_croc@yahoo.com
Wed, 10 Oct 2001 14:19:21 -0700 (PDT)


--0-377118010-1002748761=:2325
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Mr. Harald,

--- Harald Welte <laforge@gnumonks.org> wrote:
> On Sat, Sep 29, 2001 at 02:29:21PM -0700, Brad Chapman wrote:
> 
> > > I needed to MARK traffic for CBQ on a MASQUERADING/SNAT box and found out
> > > I'm missing POSTROUTING chain in the mangle table. The following
> > > (cut'n'paste :) patches (for kernel and for userspace) gave me what I
> > > needed and it appears to work.
> > > 
> > > Could someone more experienced than me review/comment on it and perhaps 
> > > integrate it to iptables/feed the kernel patches to Linus?
> > 
> > 	That's FOUR!
> > 
> > 	First me, then Mr. Harald, then Rusty, and now you, Mr. Bulej!
> > 
> > 	Mr. Harald, do you have ANY plans to integrate my patch, or Rusty's
> > patch, or Mr. Bulej's patch, or even YOUR patch?
> 
> Yes, this plan still exists.
> 
> One time more sorry, constant travelling keeps me more busy than expected
> right now.
> 
> I'm now going to debug/fix this MAC match problem (before oct 3rd) and
> then I'm going to test+submit one of the 5hook-mangle patches. 
> 
> Sorry for this very inconvenient delay.

	That's OK. I just finished a little mini-testing project with a colleague
of mine who has access to a netfilter testbox. He's tested the patch and also
sent me an updated version to fix a few bugs. So, here it is:

	linux_2.4.10_iptables_1.2.3_mangle5hooks.patch (this part will work on
		all netfilter kernels back to 2.4.2)
	iptables_1.2.3_mangle5hooks.patch (this needs libiptc 1.2.3)

	The patches are MIME'd in the message, and are included in "out-of-the-box"
mode below.

> 
> > Brad
> 
> -- 
> Live long and prosper
> - Harald Welte / laforge@gnumonks.org               http://www.gnumonks.org/

Brad

<snip name="linux_2.4.10_iptables_1.2.3_mangle5hooks.patch">

diff -u --new-file --recursive linux_vanilla/net/ipv4/netfilter/iptable_mangle.c
linux_mangle5hooks/net/ipv4/netfilter/iptable_mangle.c
--- linux_vanilla/net/ipv4/netfilter/iptable_mangle.c   Sat Jul  7 00:07:55 2001
+++ linux_mangle5hooks/net/ipv4/netfilter/iptable_mangle.c      Sun Sep 30 21:45:53
2001
@@ -2,6 +2,9 @@
  * This is the 1999 rewrite of IP Firewalling, aiming for kernel 2.3.x.
  *
  * Copyright (C) 1999 Paul `Rusty' Russell & Michael J. Neuling
+ *
+ * This table was expanded to use all five netfilter hooks for
+ * IPv4 by Brad Chapman.
  */
 #include <linux/config.h>
 #include <linux/module.h>
@@ -12,7 +15,11 @@
 #include <net/route.h>
 #include <linux/ip.h>
 
-#define MANGLE_VALID_HOOKS ((1 << NF_IP_PRE_ROUTING) | (1 << NF_IP_LOCAL_OUT))
+#define MANGLE_VALID_HOOKS ((1 << NF_IP_PRE_ROUTING) | \
+                           (1 << NF_IP_LOCAL_IN) | \
+                           (1 << NF_IP_FORWARD) | \
+                           (1 << NF_IP_LOCAL_OUT) | \
+                           (1 << NF_IP_POST_ROUTING))
 
 /* Standard entry. */
 struct ipt_standard
@@ -36,15 +43,21 @@
 static struct
 {
        struct ipt_replace repl;
-       struct ipt_standard entries[2];
+       struct ipt_standard entries[5];
        struct ipt_error term;
 } initial_table __initdata
-= { { "mangle", MANGLE_VALID_HOOKS, 3,
-      sizeof(struct ipt_standard) * 2 + sizeof(struct ipt_error),
-      { [NF_IP_PRE_ROUTING] 0,
-       [NF_IP_LOCAL_OUT] sizeof(struct ipt_standard) },
-      { [NF_IP_PRE_ROUTING] 0,
-       [NF_IP_LOCAL_OUT] sizeof(struct ipt_standard) },
+= { { "mangle", MANGLE_VALID_HOOKS, 6,
+      sizeof(struct ipt_standard) * 5 + sizeof(struct ipt_error),
+      { [NF_IP_PRE_ROUTING]    0,
+       [NF_IP_LOCAL_IN]        sizeof(struct ipt_standard),
+       [NF_IP_FORWARD]         sizeof(struct ipt_standard) * 2,
+       [NF_IP_LOCAL_OUT]       sizeof(struct ipt_standard) * 3,
+       [NF_IP_POST_ROUTING]    sizeof(struct ipt_standard) * 4 },
+      { [NF_IP_PRE_ROUTING]    0,
+       [NF_IP_LOCAL_IN]        sizeof(struct ipt_standard),
+       [NF_IP_FORWARD]         sizeof(struct ipt_standard) * 2,
+       [NF_IP_LOCAL_OUT]       sizeof(struct ipt_standard) * 3,
+       [NF_IP_POST_ROUTING]    sizeof(struct ipt_standard) * 4 },
       0, NULL, { } },
     {
            /* PRE_ROUTING */
@@ -55,6 +68,22 @@
                0, { 0, 0 }, { } },
              { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } }, { } },
                -NF_ACCEPT - 1 } },
+           /* LOCAL_IN */
+           { { { { 0 }, { 0 }, { 0 }, { 0 }, "", "", { 0 }, { 0 }, 0, 0, 0 },
+               0,
+               sizeof(struct ipt_entry),
+               sizeof(struct ipt_standard),
+               0, { 0, 0 }, { } },
+             { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } }, { } },
+               -NF_ACCEPT - 1 } },
+           /* FORWARD */
+           { { { { 0 }, { 0 }, { 0 }, { 0 }, "", "", { 0 }, { 0 }, 0, 0, 0 },
+               0,
+               sizeof(struct ipt_entry),
+               sizeof(struct ipt_standard),
+               0, { 0, 0 }, { } },
+             { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } }, { } },
+               -NF_ACCEPT - 1 } },
            /* LOCAL_OUT */
            { { { { 0 }, { 0 }, { 0 }, { 0 }, "", "", { 0 }, { 0 }, 0, 0, 0 },
                0,
@@ -62,6 +91,14 @@
                sizeof(struct ipt_standard),
                0, { 0, 0 }, { } },
              { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } }, { } },
+               -NF_ACCEPT - 1 } },
+           /* POST_ROUTING */
+           { { { { 0 }, { 0 }, { 0 }, { 0 }, "", "", { 0 }, { 0 }, 0, 0, 0 },
+               0,
+               sizeof(struct ipt_entry),
+               sizeof(struct ipt_standard),
+               0, { 0, 0 }, { } },
+             { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } }, { } },
                -NF_ACCEPT - 1 } }
     },
     /* ERROR */
@@ -83,11 +120,11 @@
 
 /* The work comes in here from netfilter.c. */
 static unsigned int
-ipt_hook(unsigned int hook,
-        struct sk_buff **pskb,
-        const struct net_device *in,
-        const struct net_device *out,
-        int (*okfn)(struct sk_buff *))
+ipt_route_hook( unsigned int hook,
+               struct sk_buff **pskb,
+               const struct net_device *in,
+               const struct net_device *out,
+               int (*okfn)(struct sk_buff *))
 {
        return ipt_do_table(pskb, hook, in, out, &packet_mangler, NULL);
 }
@@ -121,11 +158,11 @@
 }
 
 static unsigned int
-ipt_local_out_hook(unsigned int hook,
-                  struct sk_buff **pskb,
-                  const struct net_device *in,
-                  const struct net_device *out,
-                  int (*okfn)(struct sk_buff *))
+ipt_local_hook( unsigned int hook,
+               struct sk_buff **pskb,
+               const struct net_device *in,
+               const struct net_device *out,
+               int (*okfn)(struct sk_buff *))
 {
        unsigned int ret;
        u_int8_t tos;
@@ -159,9 +196,11 @@
 }
 
 static struct nf_hook_ops ipt_ops[]
-= { { { NULL, NULL }, ipt_hook, PF_INET, NF_IP_PRE_ROUTING, NF_IP_PRI_MANGLE },
-    { { NULL, NULL }, ipt_local_out_hook, PF_INET, NF_IP_LOCAL_OUT,
-               NF_IP_PRI_MANGLE }
+= { { { NULL, NULL }, ipt_route_hook, PF_INET, NF_IP_PRE_ROUTING,     
NF_IP_PRI_MANGLE },
+    { { NULL, NULL }, ipt_local_hook, PF_INET, NF_IP_LOCAL_IN,        
NF_IP_PRI_MANGLE },
+    { { NULL, NULL }, ipt_route_hook, PF_INET, NF_IP_FORWARD,         
NF_IP_PRI_MANGLE },
+    { { NULL, NULL }, ipt_local_hook, PF_INET, NF_IP_LOCAL_OUT,               
NF_IP_PRI_MANGLE },
+    { { NULL, NULL }, ipt_route_hook, PF_INET, NF_IP_POST_ROUTING,    
NF_IP_PRI_MANGLE }
 };
 
 static int __init init(void)
@@ -182,8 +221,26 @@
        if (ret < 0)
                goto cleanup_hook0;
 
+       ret = nf_register_hook(&ipt_ops[2]);
+       if (ret < 0)
+               goto cleanup_hook1;
+
+       ret = nf_register_hook(&ipt_ops[3]);
+       if (ret < 0)
+               goto cleanup_hook2;
+
+       ret = nf_register_hook(&ipt_ops[4]);
+       if (ret < 0)
+               goto cleanup_hook3;
+
        return ret;
 
+ cleanup_hook3:
+       nf_unregister_hook(&ipt_ops[3]);
+ cleanup_hook2:
+       nf_unregister_hook(&ipt_ops[2]);
+ cleanup_hook1:
+       nf_unregister_hook(&ipt_ops[1]);
  cleanup_hook0:
        nf_unregister_hook(&ipt_ops[0]);
  cleanup_table:
diff -u --new-file --recursive linux_vanilla/net/ipv6/netfilter/ip6table_mangle.c
linux_mangle5hooks/net/ipv6/netfilter/ip6table_mangle.c
--- linux_vanilla/net/ipv6/netfilter/ip6table_mangle.c  Mon Jan 22 21:30:21 2001
+++ linux_mangle5hooks/net/ipv6/netfilter/ip6table_mangle.c     Sun Sep 30 20:56:26
2001
@@ -2,11 +2,24 @@
  * IPv6 packet mangling table, a port of the IPv4 mangle table to IPv6
  *
  * Copyright (C) 2000 by Harald Welte <laforge@gnumonks.org>
+ *
+ * This table was expanded to use all five netfilter hooks for
+ * IPv6 by Brad Chapman.
  */
 #include <linux/module.h>
+#include <linux/config.h>
 #include <linux/netfilter_ipv6/ip6_tables.h>
-
-#define MANGLE_VALID_HOOKS ((1 << NF_IP6_PRE_ROUTING) | (1 << NF_IP6_LOCAL_OUT))
+#include <linux/netdevice.h>
+#include <linux/skbuff.h>
+#include <net/sock.h>
+#include <net/route.h>
+#include <linux/ipv6.h>
+
+#define MANGLE_VALID_HOOKS ((1 << NF_IP6_PRE_ROUTING) | \
+                           (1 << NF_IP6_LOCAL_IN) | \
+                           (1 << NF_IP6_FORWARD) | \
+                           (1 << NF_IP6_LOCAL_OUT) | \
+                           (1 << NF_IP6_POST_ROUTING))
 
 #if 1
 #define DEBUGP(x, args...)     printk(KERN_DEBUG x, ## args)
@@ -36,15 +49,21 @@
 static struct
 {
        struct ip6t_replace repl;
-       struct ip6t_standard entries[2];
+       struct ip6t_standard entries[5];
        struct ip6t_error term;
 } initial_table __initdata
-= { { "mangle", MANGLE_VALID_HOOKS, 3,
-      sizeof(struct ip6t_standard) * 2 + sizeof(struct ip6t_error),
-      { [NF_IP6_PRE_ROUTING] 0,
-       [NF_IP6_LOCAL_OUT] sizeof(struct ip6t_standard) },
-      { [NF_IP6_PRE_ROUTING] 0,
-       [NF_IP6_LOCAL_OUT] sizeof(struct ip6t_standard) },
+= {  { "mangle", MANGLE_VALID_HOOKS, 6,
+      sizeof(struct ip6t_standard) * 5 + sizeof(struct ip6t_error),
+      { [NF_IP6_PRE_ROUTING]   0,
+       [NF_IP6_LOCAL_IN]       sizeof(struct ip6t_standard),
+       [NF_IP6_FORWARD]        sizeof(struct ip6t_standard) * 2,
+       [NF_IP6_LOCAL_OUT]      sizeof(struct ip6t_standard) * 3,
+       [NF_IP6_POST_ROUTING]   sizeof(struct ip6t_standard) * 4 },
+      { [NF_IP6_PRE_ROUTING]   0,
+       [NF_IP6_LOCAL_IN]       sizeof(struct ip6t_standard),
+       [NF_IP6_FORWARD]        sizeof(struct ip6t_standard) * 2,
+       [NF_IP6_LOCAL_OUT]      sizeof(struct ip6t_standard) * 3,
+       [NF_IP6_POST_ROUTING]   sizeof(struct ip6t_standard) * 4 },
       0, NULL, { } },
     {
            /* PRE_ROUTING */
@@ -55,6 +74,22 @@
                0, { 0, 0 }, { } },
              { { { { IP6T_ALIGN(sizeof(struct ip6t_standard_target)), "" } }, { }
},
                -NF_ACCEPT - 1 } },
+           /* LOCAL_IN */
+           { { { { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, "",
"", { 0 }, { 0 }, 0, 0, 0 },
+               0,
+               sizeof(struct ip6t_entry),
+               sizeof(struct ip6t_standard),
+               0, { 0, 0 }, { } },
+             { { { { IP6T_ALIGN(sizeof(struct ip6t_standard_target)), "" } }, { }
},
+               -NF_ACCEPT - 1 } },
+           /* FORWARD */
+           { { { { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, "",
"", { 0 }, { 0 }, 0, 0, 0 },
+               0,
+               sizeof(struct ip6t_entry),
+               sizeof(struct ip6t_standard),
+               0, { 0, 0 }, { } },
+             { { { { IP6T_ALIGN(sizeof(struct ip6t_standard_target)), "" } }, { }
},
+               -NF_ACCEPT - 1 } },
            /* LOCAL_OUT */
            { { { { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, "",
"", { 0 }, { 0 }, 0, 0, 0 },
                0,
@@ -62,6 +97,14 @@
                sizeof(struct ip6t_standard),
                0, { 0, 0 }, { } },
              { { { { IP6T_ALIGN(sizeof(struct ip6t_standard_target)), "" } }, { }
},
+               -NF_ACCEPT - 1 } },
+           /* POST_ROUTING */
+           { { { { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, "",
"", { 0 }, { 0 }, 0, 0, 0 },
+               0,
+               sizeof(struct ip6t_entry),
+               sizeof(struct ip6t_standard),
+               0, { 0, 0 }, { } },
+             { { { { IP6T_ALIGN(sizeof(struct ip6t_standard_target)), "" } }, { }
},
                -NF_ACCEPT - 1 } }
     },
     /* ERROR */
@@ -83,21 +126,21 @@
 
 /* The work comes in here from netfilter.c. */
 static unsigned int
-ip6t_hook(unsigned int hook,
-        struct sk_buff **pskb,
-        const struct net_device *in,
-        const struct net_device *out,
-        int (*okfn)(struct sk_buff *))
+ip6t_route_hook(unsigned int hook,
+               struct sk_buff **pskb,
+               const struct net_device *in,
+               const struct net_device *out,
+               int (*okfn)(struct sk_buff *))
 {
        return ip6t_do_table(pskb, hook, in, out, &packet_mangler, NULL);
 }
 
 static unsigned int
-ip6t_local_out_hook(unsigned int hook,
-                  struct sk_buff **pskb,
-                  const struct net_device *in,
-                  const struct net_device *out,
-                  int (*okfn)(struct sk_buff *))
+ip6t_local_hook(unsigned int hook,
+               struct sk_buff **pskb,
+               const struct net_device *in,
+               const struct net_device *out,
+               int (*okfn)(struct sk_buff *))
 {
 
        unsigned long nfmark;
@@ -142,9 +185,11 @@
 }
 
 static struct nf_hook_ops ip6t_ops[]
-= { { { NULL, NULL }, ip6t_hook, PF_INET6, NF_IP6_PRE_ROUTING, NF_IP6_PRI_MANGLE },
-    { { NULL, NULL }, ip6t_local_out_hook, PF_INET6, NF_IP6_LOCAL_OUT,
-               NF_IP6_PRI_MANGLE }
+= { { { NULL, NULL }, ip6t_route_hook, PF_INET6, NF_IP6_PRE_ROUTING,  
NF_IP6_PRI_MANGLE },
+    { { NULL, NULL }, ip6t_local_hook, PF_INET6, NF_IP6_LOCAL_IN,     
NF_IP6_PRI_MANGLE },
+    { { NULL, NULL }, ip6t_route_hook, PF_INET6, NF_IP6_FORWARD,      
NF_IP6_PRI_MANGLE },
+    { { NULL, NULL }, ip6t_local_hook, PF_INET6, NF_IP6_LOCAL_OUT,    
NF_IP6_PRI_MANGLE },
+    { { NULL, NULL }, ip6t_route_hook, PF_INET6, NF_IP6_POST_ROUTING, 
NF_IP6_PRI_MANGLE }
 };
 
 static int __init init(void)
@@ -165,8 +210,26 @@
        if (ret < 0)
                goto cleanup_hook0;
 
+       ret = nf_register_hook(&ip6t_ops[2]);
+       if (ret < 0)
+               goto cleanup_hook1;
+
+       ret = nf_register_hook(&ip6t_ops[3]);
+       if (ret < 0)
+               goto cleanup_hook2;
+
+       ret = nf_register_hook(&ip6t_ops[4]);
+       if (ret < 0)
+               goto cleanup_hook3;
+
        return ret;
 
+ cleanup_hook3:
+       nf_unregister_hook(&ip6t_ops[3]);
+ cleanup_hook2:
+       nf_unregister_hook(&ip6t_ops[2]);
+ cleanup_hook1:
+       nf_unregister_hook(&ip6t_ops[1]);
  cleanup_hook0:
        nf_unregister_hook(&ip6t_ops[0]);
  cleanup_table:

</snip>

<snip name="iptables_1.2.3_mangle5hooks.patch">

diff -u --new-file --recursive iptables-1.2.3_vanilla/libiptc/libip4tc.c
iptables-1.2.3_mangle5hooks/libiptc/libip4tc.c
--- iptables-1.2.3_vanilla/libiptc/libip4tc.c   Fri Jan  5 15:22:59 2001
+++ iptables-1.2.3_mangle5hooks/libiptc/libip4tc.c      Sun Sep 30 23:07:06 2001
@@ -383,16 +383,31 @@
        } else if (strcmp(h->info.name, "mangle") == 0) {
                assert(h->info.valid_hooks
                       == (1 << NF_IP_PRE_ROUTING
-                          | 1 << NF_IP_LOCAL_OUT));
+                          | 1 << NF_IP_LOCAL_IN
+                          | 1 << NF_IP_FORWARD
+                          | 1 << NF_IP_LOCAL_OUT
+                          | 1 << NF_IP_POST_ROUTING));
 
                /* Hooks should be first two */
                assert(h->info.hook_entry[NF_IP_PRE_ROUTING] == 0);
 
                n = get_chain_end(h, 0);
                n += get_entry(h, n)->next_offset;
+               assert(h->info.hook_entry[NF_IP_LOCAL_IN] == n);
+
+               n = get_chain_end(h, n);
+               n += get_entry(h, n)->next_offset;
+               assert(h->info.hook_entry[NF_IP_FORWARD] == n);
+
+               n = get_chain_end(h, n);
+               n += get_entry(h, n)->next_offset;
                assert(h->info.hook_entry[NF_IP_LOCAL_OUT] == n);
 
-               user_offset = h->info.hook_entry[NF_IP_LOCAL_OUT];
+               n = get_chain_end(h, n);
+               n += get_entry(h, n)->next_offset;
+               assert(h->info.hook_entry[NF_IP_POST_ROUTING] == n);
+
+               user_offset = h->info.hook_entry[NF_IP_POST_ROUTING];
 #ifdef NF_IP_DROPPING
        } else if (strcmp(h->info.name, "drop") == 0) {
                assert(h->info.valid_hooks == (1 << NF_IP_DROPPING));
diff -u --new-file --recursive iptables-1.2.3_vanilla/libiptc/libip6tc.c
iptables-1.2.3_mangle5hooks/libiptc/libip6tc.c
--- iptables-1.2.3_vanilla/libiptc/libip6tc.c   Fri Jan  5 15:22:59 2001
+++ iptables-1.2.3_mangle5hooks/libiptc/libip6tc.c      Sun Sep 30 23:06:35 2001
@@ -329,16 +329,31 @@
        } else if (strcmp(h->info.name, "mangle") == 0) {
                assert(h->info.valid_hooks
                       == (1 << NF_IP6_PRE_ROUTING
-                          | 1 << NF_IP6_LOCAL_OUT));
+                          | 1 << NF_IP6_LOCAL_OUT
+                          | 1 << NF_IP6_FORWARD
+                          | 1 << NF_IP6_LOCAL_OUT
+                          | 1 << NF_IP6_POST_ROUTING));
 
-               /* Hooks should be first three */
+               /* Hooks should be first five */
                assert(h->info.hook_entry[NF_IP6_PRE_ROUTING] == 0);
 
                n = get_chain_end(h, 0);
                n += get_entry(h, n)->next_offset;
+               assert(h->info.hook_entry[NF_IP6_LOCAL_IN] == n);
+
+               n = get_chain_end(h, n);
+               n += get_entry(h, n)->next_offset;
+               assert(h->info.hook_entry[NF_IP6_FORWARD] == n);
+
+               n = get_chain_end(h, n);
+               n += get_entry(h, n)->next_offset;
                assert(h->info.hook_entry[NF_IP6_LOCAL_OUT] == n);
 
-               user_offset = h->info.hook_entry[NF_IP6_LOCAL_OUT];
+               n = get_chain_end(h, n);
+               n += get_entry(h, n)->next_offset;
+               assert(h->info.hook_entry[NF_IP6_POST_ROUTING] == n);
+
+               user_offset = h->info.hook_entry[NF_IP6_POST_ROUTING];
        } else
                abort();
 
</snip>

=====
Brad Chapman

Permanent e-mail: kakadu_croc@yahoo.com
Current e-mail: kakadu@adelphia.net
Alternate e-mail: kakadu@netscape.net

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
--0-377118010-1002748761=:2325
Content-Type: application/x-unknown; name="linux_2.4.10_iptables_1.2.3_mangle5hooks.patch"
Content-Transfer-Encoding: base64
Content-Description: linux_2.4.10_iptables_1.2.3_mangle5hooks.patch
Content-Disposition: attachment; filename="linux_2.4.10_iptables_1.2.3_mangle5hooks.patch"

ZGlmZiAtdSAtLW5ldy1maWxlIC0tcmVjdXJzaXZlIGxpbnV4X3ZhbmlsbGEv
bmV0L2lwdjQvbmV0ZmlsdGVyL2lwdGFibGVfbWFuZ2xlLmMgbGludXhfbWFu
Z2xlNWhvb2tzL25ldC9pcHY0L25ldGZpbHRlci9pcHRhYmxlX21hbmdsZS5j
Ci0tLSBsaW51eF92YW5pbGxhL25ldC9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bnVwX2hvb2szOgorCW5mX3VucmVnaXN0ZXJfaG9vaygmaXA2dF9v
cHNbM10pOworIGNsZWFudXBfaG9vazI6CisJbmZfdW5yZWdpc3Rlcl9ob29r
KCZpcDZ0X29wc1syXSk7CisgY2xlYW51cF9ob29rMToKKwluZl91bnJlZ2lz
dGVyX2hvb2soJmlwNnRfb3BzWzFdKTsKICBjbGVhbnVwX2hvb2swOgogCW5m
X3VucmVnaXN0ZXJfaG9vaygmaXA2dF9vcHNbMF0pOwogIGNsZWFudXBfdGFi
bGU6Cg==

--0-377118010-1002748761=:2325
Content-Type: application/x-unknown; name="iptables_1.2.3_mangle5hooks.patch"
Content-Transfer-Encoding: base64
Content-Description: iptables_1.2.3_mangle5hooks.patch
Content-Disposition: attachment; filename="iptables_1.2.3_mangle5hooks.patch"

ZGlmZiAtdSAtLW5ldy1maWxlIC0tcmVjdXJzaXZlIGlwdGFibGVzLTEuMi4z
X3ZhbmlsbGEvbGliaXB0Yy9saWJpcDR0Yy5jIGlwdGFibGVzLTEuMi4zX21h
bmdsZTVob29rcy9saWJpcHRjL2xpYmlwNHRjLmMKLS0tIGlwdGFibGVzLTEu
Mi4zX3ZhbmlsbGEvbGliaXB0Yy9saWJpcDR0Yy5jCUZyaSBKYW4gIDUgMTU6
MjI6NTkgMjAwMQorKysgaXB0YWJsZXMtMS4yLjNfbWFuZ2xlNWhvb2tzL2xp
YmlwdGMvbGliaXA0dGMuYwlTdW4gU2VwIDMwIDIzOjA3OjA2IDIwMDEKQEAg
LTM4MywxNiArMzgzLDMxIEBACiAJfSBlbHNlIGlmIChzdHJjbXAoaC0+aW5m
by5uYW1lLCAibWFuZ2xlIikgPT0gMCkgewogCQlhc3NlcnQoaC0+aW5mby52
YWxpZF9ob29rcwogCQkgICAgICAgPT0gKDEgPDwgTkZfSVBfUFJFX1JPVVRJ
TkcKLQkJCSAgIHwgMSA8PCBORl9JUF9MT0NBTF9PVVQpKTsKKwkJCSAgIHwg
MSA8PCBORl9JUF9MT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