Skip to content

Commit

Permalink
[NETFILTER]: Fix incorrect use of skb_make_writable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joonwoo Park authored and David S. Miller committed Feb 20, 2008
1 parent f449b3b commit eb1197b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_dnat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_redirect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_snat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/arpt_mangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eb1197b

Please sign in to comment.