[NETFILTER]: Fix incorrect use of skb_make_writable
authorJoonwoo Park <joonwpark81@gmail.com>
Wed, 20 Feb 2008 01:18:47 +0000 (17:18 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Feb 2008 01:18:47 +0000 (17:18 -0800)
http://bugzilla.kernel.org/show_bug.cgi?id=9920
The function skb_make_writable returns true or false.

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/netfilter/ebt_dnat.c
net/bridge/netfilter/ebt_redirect.c
net/bridge/netfilter/ebt_snat.c
net/ipv4/netfilter/arpt_mangle.c

index e700cbf634c24826c9b257364b77a969d884af1a..1ec671d93ddaf455069ab8a5c90ab1fdcf7a2db6 100644 (file)
@@ -20,7 +20,7 @@ static int ebt_target_dnat(struct sk_buff *skb, unsigned int hooknr,
 {
        const struct ebt_nat_info *info = data;
 
-       if (skb_make_writable(skb, 0))
+       if (!skb_make_writable(skb, 0))
                return NF_DROP;
 
        memcpy(eth_hdr(skb)->h_dest, info->mac, ETH_ALEN);
index bfdf2fb60b1f0cbd16050390e01aba0bdbb9886a..bfb9f74e21169badc135df30245386f77518eca8 100644 (file)
@@ -21,7 +21,7 @@ static int ebt_target_redirect(struct sk_buff *skb, unsigned int hooknr,
 {
        const struct ebt_redirect_info *info = data;
 
-       if (skb_make_writable(skb, 0))
+       if (!skb_make_writable(skb, 0))
                return NF_DROP;
 
        if (hooknr != NF_BR_BROUTING)
index e252dabbb143c80536473c77542b4ecf685c7bc2..204f9965fb9ef8b3fcdbcddeae583f66808e4e3f 100644 (file)
@@ -22,7 +22,7 @@ static int ebt_target_snat(struct sk_buff *skb, unsigned int hooknr,
 {
        const struct ebt_nat_info *info = data;
 
-       if (skb_make_writable(skb, 0))
+       if (!skb_make_writable(skb, 0))
                return NF_DROP;
 
        memcpy(eth_hdr(skb)->h_source, info->mac, ETH_ALEN);
index 45fa4e20094a359c17130fe0ae671fa6a07c3462..3f4222b0a803bfc96dca4c0c85c306c931037090 100644 (file)
@@ -19,7 +19,7 @@ target(struct sk_buff *skb,
        unsigned char *arpptr;
        int pln, hln;
 
-       if (skb_make_writable(skb, skb->len))
+       if (!skb_make_writable(skb, skb->len))
                return NF_DROP;
 
        arp = arp_hdr(skb);