Skip to contentSkip to conversation

trivial patches for patch-o-matic-ng ipp2p, tproxy, TPROXY and comment

PATCH Applied Torsten Luettgert 2 participants 2 messages Feb 13, 2005 – Feb 14, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trivial patches for patch-o-matic-ng ipp2p, tproxy, TPROXY and comment

Hi,

afaics, it is vital to use the ".field = value" syntax in iptables_match definitions now. There's this new field "u_int8_t revision" which gets in the way for some old matches.

ipp2p, tproxy, TPROXY and comment from pom-ng don't do this yet, so iptables won't compile if they are inserted.

Attached are the (trivial) patches to make them work again.

Thanks,
Torsten Lüttgert <[email protected]>

iptables/extensions/libipt_ipp2p.c +13 -12
@@ -431,18 +431,19 @@
 
 static
 struct iptables_match ipp2p
-= { NULL,
-    "ipp2p",
-    IPTABLES_VERSION, 
-    IPT_ALIGN(sizeof(struct ipt_p2p_info)),
-    IPT_ALIGN(sizeof(struct ipt_p2p_info)),
-    &help,
-    &init,
-    &parse,
-    &final_check,
-    &print,
-    &save,
-    opts
+= {
+   .next          = NULL,
+   .name          = "ipp2p",
+   .version       = IPTABLES_VERSION, 
+   .size          = IPT_ALIGN(sizeof(struct ipt_p2p_info)),
+   .userspacesize = IPT_ALIGN(sizeof(struct ipt_p2p_info)),
+   .help          = &help,
+   .init          = &init,
+   .parse         = &parse,
+   .final_check   = &final_check,
+   .print         = &print,
+   .save          = &save,
+   .extra_opts    = opts
 };
 					    
 
iptables/extensions/libipt_tproxy.c +12 -12
@@ -57,18 +57,18 @@
 
 static
 struct iptables_match tproxy
-= { NULL,
-    "tproxy",
-    IPTABLES_VERSION,
-    0, 
-    0, 
-    &help,
-    &init,
-    &parse,
-    &final_check,
-    &print,
-    &save,
-    opts
+= { .next            = NULL,
+    .name            = "tproxy",
+    .version         = IPTABLES_VERSION,
+    .size            = 0, 
+    .userspacesize   = 0, 
+    .help            = &help,
+    .init            = &init,
+    .parse           = &parse,
+    .final_check     = &final_check,
+    .print           = &print,
+    .save            = &save,
+    .extra_opts      = opts
 };
 
 void _init(void)
iptables/extensions/libipt_TPROXY.c +13 -12
@@ -118,18 +118,19 @@
 }
 
 struct iptables_target tproxy
-= { NULL,
-    "TPROXY",
-    IPTABLES_VERSION,
-    IPT_ALIGN(sizeof(struct ipt_tproxy_target_info)),
-    IPT_ALIGN(sizeof(struct ipt_tproxy_target_info)),
-    &help,
-    &init,
-    &parse,
-    &final_check,
-    &print,
-    &save,
-    opts
+= {
+   .next            = NULL,
+   .name            = "TPROXY",
+   .version         = IPTABLES_VERSION,
+   .size            = IPT_ALIGN(sizeof(struct ipt_tproxy_target_info)),
+   .userspacesize   = IPT_ALIGN(sizeof(struct ipt_tproxy_target_info)),
+   .help            = &help,
+   .init            = &init,
+   .parse           = &parse,
+   .final_check     = &final_check,
+   .print           = &print,
+   .save            = &save,
+   .extra_opts      = opts
 };
 
 void _init(void)
iptables/extensions/libipt_comment.c +12 -12
@@ -105,18 +105,18 @@
 
 static
 struct iptables_match comment
-= { NULL,
-    "comment",
-    IPTABLES_VERSION,
-    IPT_ALIGN(sizeof(struct ipt_comment_info)),
-    IPT_ALIGN(sizeof(struct ipt_comment_info)),
-    &help,
-    &init,
-    &parse,
-    &final_check,
-    &print,
-    &save,
-    opts
+= { .next            = NULL,
+    .name            = "comment",
+    .version         = IPTABLES_VERSION,
+    .size            = IPT_ALIGN(sizeof(struct ipt_comment_info)),
+    .userspacesize   = IPT_ALIGN(sizeof(struct ipt_comment_info)),
+    .help            = &help,
+    .init            = &init,
+    .parse           = &parse,
+    .final_check     = &final_check,
+    .print           = &print,
+    .save            = &save,
+    .extra_opts      = opts
 };
 
 void _init(void)
Applied
#1 lore raw
Quoted 1 line · Torsten Luettgert

Attached are the (trivial) patches to make them work again.

Thanks, applied to svn.

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie