Skip to contentSkip to conversation

fix warning in ip{,6}t_policy.c

PATCH In review Benoit Boissinot 2 participants 2 messages Jan 14, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix warning in ip{,6}t_policy.c

Hi,

the following warnings appeared in -mm4
net/ipv4/netfilter/ipt_policy.c:154: warning: initialization from incompatible pointer type net/ipv4/netfilter/ipt_policy.c:155: warning: initialization from incompatible pointer type net/ipv6/netfilter/ip6t_policy.c:160: warning: initialization from incompatible pointer type

It looks like they were missed in the x_tables conversion.

net/ipv4/netfilter/ipt_policy.c +5 -2
@@ -95,7 +95,10 @@
 static int match(const struct sk_buff *skb,
                  const struct net_device *in,
                  const struct net_device *out,
-                 const void *matchinfo, int offset, int *hotdrop)
+                 const void *matchinfo,
+                 int offset,
+                 unsigned int protoff,
+                 int *hotdrop)
 {
 	const struct ipt_policy_info *info = matchinfo;
 	int ret;
@@ -113,7 +116,7 @@
 	return ret;
 }
 
-static int checkentry(const char *tablename, const struct ipt_ip *ip,
+static int checkentry(const char *tablename, const void *ip_void,
                       void *matchinfo, unsigned int matchsize,
                       unsigned int hook_mask)
 {
net/ipv6/netfilter/ip6t_policy.c +1 -1
@@ -118,7 +118,7 @@
 	return ret;
 }
 
-static int checkentry(const char *tablename, const struct ip6t_ip6 *ip,
+static int checkentry(const char *tablename, const void *ip_void,
                       void *matchinfo, unsigned int matchsize,
                       unsigned int hook_mask)
 {
#1 lore raw
Quoted 6 lines · Benoit Boissinot

Hi,

the following warnings appeared in -mm4
net/ipv4/netfilter/ipt_policy.c:154: warning: initialization from incompatible pointer type net/ipv4/netfilter/ipt_policy.c:155: warning: initialization from incompatible pointer type net/ipv6/netfilter/ip6t_policy.c:160: warning: initialization from incompatible pointer type

oops, sorry. my mistake when merging patricks' ipt_policy code with x_tables.

Quoted 1 line

It looks like they were missed in the x_tables conversion.

yes, since they were developed separately and only later merged.

Quoted 1 line

I'll push this without any modifications via DaveM.

Signature · 5 lines
- Harald Welte <[email protected]>                 http://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