[NETFILTER]: Fix incorrect use of skb_make_writable

http://bugzilla.kernel.org/show_bug.cgi?id=9920
The function skb_make_writable returns true or false.

Signed-off-by: Joonwoo Park <[email protected]>
Signed-off-by: Patrick McHardy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Joonwoo Park 2008-02-19 17:18:47 -08:00 • committed by David S. Miller
commit eb1197bc0e
4 changed files with 4 additions and 4 deletions

View 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);

View 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)

View 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);