Skip to contentSkip to conversation

concerning p-o-m fixes for 2.6.17 API change

PATCH New Torsten Luettgert 3 participants 5 messages Jun 23, 2006 – Jun 24, 2006 netfilter

lore
Share & tools
lore
#0 lore raw

Hi list,

I noticed the match/target API changed a bit in 2.6.17, so a bunch of code in patch-o-matic-ng needs updates. I fixed ipp2p, ROUTE, time, and u32 (it's quite trivial).

I'd like to submit the patches (and thus work against the "bit-rot" we all hate). Problem is, they are quite clumsy - the correct way IMHO is to copy the latest kernel directory (normally linux-2.6/) to linux-2.6.17 and then fix that, so 2.6.16 and older kernels still work, too. So you can't see what is happening in the patches, they just create 99% identical copies of the old files.

Patrick, I guess you're the one to ask - would you like those patches, and in what format?

Regards,
Torsten

#1 lore raw
Quoted 14 lines · Torsten Luettgert

Hi list,

I noticed the match/target API changed a bit in 2.6.17, so a bunch of code in patch-o-matic-ng needs updates. I fixed ipp2p, ROUTE, time, and u32 (it's quite trivial).

I'd like to submit the patches (and thus work against the "bit-rot" we all hate). Problem is, they are quite clumsy - the correct way IMHO is to copy the latest kernel directory (normally linux-2.6/) to linux-2.6.17 and then fix that, so 2.6.16 and older kernels still work, too. So you can't see what is happening in the patches, they just create 99% identical copies of the old files.

Quoted 2 lines

Patrick, I guess you're the one to ask - would you like those patches, and in what format?

As for time and ipp2p current pom-ng contains versions for 2.6.16 and 2.6.16.x (-stable) kernels. There is no need to keep patches for that kernels since anyone interesed in older kernels than 2.6.17 is able to take older pom-ng tarball. So, please send ipp2p and time (with CC to me) and patches that only corrects API in the "linux-2.6" directory . The same advise is probably correct for both ROUTE and u32 but I think Patrick should confirm this.

Thanks.

Best regards,

Krzysztof Olędzki

#2 lore raw

PATCH 1/1 2.6.17 API changes for ipp2p, time

Quoted 3 lines · Krzysztof Oledzki

So, please send ipp2p and time (with CC to me)
and patches that only corrects API in the "linux-2.6" directory .

Ok, here you are...

Regards,
Torsten Lüttgert

linux-2.6/net/ipv4/netfilter/ipt_ipp2p.c +3 -1
Index: ipp2p/linux-2.6/net/ipv4/netfilter/ipt_ipp2p.c
===================================================================
@@ -728,6 +728,7 @@
 match(const struct sk_buff *skb,
       const struct net_device *in,
       const struct net_device *out,
+      const struct xt_match *match,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
@@ -811,7 +812,8 @@
 
 static int
 checkentry(const char *tablename,
-            const void *ip,
+	    const void *ip,
+	    const struct xt_match *match,
 	    void *matchinfo,
 	    unsigned int matchsize,
 	    unsigned int hook_mask)
linux-2.6/net/ipv4/netfilter/ipt_time.c +2 -0
Index: time/linux-2.6/net/ipv4/netfilter/ipt_time.c
===================================================================
@@ -46,6 +46,7 @@
 match(const struct sk_buff *skb,
       const struct net_device *in,
       const struct net_device *out,
+      const struct xt_match *match,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
@@ -83,6 +84,7 @@
 static int
 checkentry(const char *tablename,
            const void *ip,
+           const struct xt_match *match,
            void *matchinfo,
            unsigned int matchsize,
            unsigned int hook_mask)
#3 lore raw
In reply to Torsten Luettgert
Quoted 14 lines · Torsten Luettgert

Hi list,

I noticed the match/target API changed a bit in 2.6.17, so a bunch of code in patch-o-matic-ng needs updates. I fixed ipp2p, ROUTE, time, and u32 (it's quite trivial).

I'd like to submit the patches (and thus work against the "bit-rot" we all hate). Problem is, they are quite clumsy - the correct way IMHO is to copy the latest kernel directory (normally linux-2.6/) to linux-2.6.17 and then fix that, so 2.6.16 and older kernels still work, too. So you can't see what is happening in the patches, they just create 99% identical copies of the old files.

Quoted 2 lines

Patrick, I guess you're the one to ask - would you like those patches, and in what format?

Sure, just send them along as normal diffs. But please no new directories, we decided to keep only a single version of things in pomng that runs with the latest kernel.

#4 lore raw

PATCH 1/1 2.6.17 API changes for ROUTE, u32, set

Quoted 3 lines · Patrick McHardy

Sure, just send them along as normal diffs. But please no new directories, we decided to keep only a single version of things in pomng that runs with the latest kernel.

Here are the patches for ROUTE, u32, and set.

Regards,
Torsten

linux-2.6/net/ipv4/netfilter/ipt_ROUTE.c +2 -0
Index: ROUTE/linux-2.6/net/ipv4/netfilter/ipt_ROUTE.c
===================================================================
@@ -280,6 +280,7 @@
 				     const struct net_device *in,
 				     const struct net_device *out,
 				     unsigned int hooknum,
+				     const struct xt_target *target,
 				     const void *targinfo,
 				     void *userinfo)
 {
@@ -401,6 +402,7 @@
 
 static int ipt_route_checkentry(const char *tablename,
 				const void *e,
+				const struct xt_target *target,
 				void *targinfo,
 				unsigned int targinfosize,
 				unsigned int hook_mask)
linux-2.6/net/ipv4/netfilter/ipt_SET.c +6 -2
Index: set/linux-2.6/net/ipv4/netfilter/ipt_SET.c
===================================================================
@@ -29,6 +29,7 @@
        const struct net_device *in,
        const struct net_device *out,
        unsigned int hooknum,
+       const struct xt_target *target,
        const void *targinfo,
        void *userinfo)
 {
@@ -48,7 +49,8 @@
 
 static int
 checkentry(const char *tablename,
-	   const struct ipt_entry *e,
+	   const void *e,
+	   const struct xt_target *target,
 	   void *targinfo,
 	   unsigned int targinfosize, unsigned int hook_mask)
 {
@@ -87,7 +89,9 @@
 	return 1;
 }
 
-static void destroy(void *targetinfo, unsigned int targetsize)
+static void destroy(const struct xt_target *target,
+                    void *targetinfo,
+                    unsigned int targetsize)
 {
 	struct ipt_set_info_target *info = targetinfo;
 
linux-2.6/net/ipv4/netfilter/ipt_set.c +7 -2
Index: set/linux-2.6/net/ipv4/netfilter/ipt_set.c
===================================================================
@@ -32,8 +32,10 @@
 match(const struct sk_buff *skb,
       const struct net_device *in,
       const struct net_device *out,
+      const struct xt_match *match,
       const void *matchinfo,
       int offset,
+      unsigned int protoff,
       int *hotdrop)
 {
 	const struct ipt_set_info_match *info = matchinfo;
@@ -45,7 +47,8 @@
 
 static int
 checkentry(const char *tablename,
-	   const struct ipt_ip *ip,
+	   const void *ip,
+	   const struct xt_match *match,
 	   void *matchinfo,
 	   unsigned int matchsize,
 	   unsigned int hook_mask)
@@ -74,7 +77,9 @@
 	return 1;
 }
 
-static void destroy(void *matchinfo, unsigned int matchsize)
+static void destroy(const struct xt_match *match,
+                    void *matchinfo,
+                    unsigned int matchsize)
 {
 	struct ipt_set_info_match *info = matchinfo;
 
linux-2.6/net/ipv4/netfilter/ipt_u32.c +2 -0
Index: u32/linux-2.6/net/ipv4/netfilter/ipt_u32.c
===================================================================
@@ -120,6 +120,7 @@
 match(const struct sk_buff *skb,
       const struct net_device *in,
       const struct net_device *out,
+      const struct xt_match *match,
       const void *matchinfo,
       int offset,
       unsigned int protoff,
@@ -203,6 +204,7 @@
 static int
 checkentry(const char *tablename,
            const void *ip,
+           const struct xt_match *match,
            void *matchinfo,
            unsigned int matchsize,
            unsigned int hook_mask)