From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: Patrick McHardy <kaber@trash.net>, netfilter-devel@vger.kernel.org
Subject: [NETFILTER 03/07]: Fix incorrect use of skb_make_writable
Date: Tue, 19 Feb 2008 17:25:48 +0100 (MET) [thread overview]
Message-ID: <20080219162536.13631.48348.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080219162532.13631.71318.sendpatchset@localhost.localdomain>
[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 <joonwpark81@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 02413e566cd9a49bcf1f15f69cdc749780181412
tree 9ec6b55a428fbfdd24da2bc619ebf4c5dabb0354
parent 30c709c51fa0f400859890d534cfa02eb8d06cc7
author Joonwoo Park <joonwpark81@gmail.com> Tue, 19 Feb 2008 17:15:27 +0100
committer Patrick McHardy <kaber@trash.net> Tue, 19 Feb 2008 17:15:27 +0100
net/bridge/netfilter/ebt_dnat.c | 2 +-
net/bridge/netfilter/ebt_redirect.c | 2 +-
net/bridge/netfilter/ebt_snat.c | 2 +-
net/ipv4/netfilter/arpt_mangle.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/bridge/netfilter/ebt_dnat.c b/net/bridge/netfilter/ebt_dnat.c
index e700cbf..1ec671d 100644
--- a/net/bridge/netfilter/ebt_dnat.c
+++ b/net/bridge/netfilter/ebt_dnat.c
@@ -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);
diff --git a/net/bridge/netfilter/ebt_redirect.c b/net/bridge/netfilter/ebt_redirect.c
index bfdf2fb..bfb9f74 100644
--- a/net/bridge/netfilter/ebt_redirect.c
+++ b/net/bridge/netfilter/ebt_redirect.c
@@ -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)
diff --git a/net/bridge/netfilter/ebt_snat.c b/net/bridge/netfilter/ebt_snat.c
index e252dab..204f996 100644
--- a/net/bridge/netfilter/ebt_snat.c
+++ b/net/bridge/netfilter/ebt_snat.c
@@ -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);
diff --git a/net/ipv4/netfilter/arpt_mangle.c b/net/ipv4/netfilter/arpt_mangle.c
index 45fa4e2..3f4222b 100644
--- a/net/ipv4/netfilter/arpt_mangle.c
+++ b/net/ipv4/netfilter/arpt_mangle.c
@@ -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);
next prev parent reply other threads:[~2008-02-19 16:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 16:25 [NETFILTER 00/07]: Netfilter fixes Patrick McHardy
2008-02-19 16:25 ` [NETFILTER 01/07]: nfnetlink_queue: fix SKB_LINEAR_ASSERT when mangling packet data Patrick McHardy
2008-02-19 16:25 ` [NETFILTER 02/07]: xt_u32: drop the actually unused variable from u32_match_it Patrick McHardy
2008-02-19 16:25 ` Patrick McHardy [this message]
2008-02-19 16:25 ` [NETFILTER 04/07]: Make sure xt_policy.h is unifdef'ed Patrick McHardy
2008-02-19 16:25 ` [NETFILTER 05/07]: xt_hashlimit: remove unneeded struct member Patrick McHardy
2008-02-19 16:25 ` [NETFILTER 06/07]: xt_iprange: fix subtraction-based comparison Patrick McHardy
2008-02-19 16:25 ` [NETFILTER 07/07]: Use __u32 in struct nf_inet_addr Patrick McHardy
2008-02-19 17:11 ` Jan Engelhardt
2008-02-19 17:15 ` Patrick McHardy
2008-02-20 1:25 ` [NETFILTER 00/07]: Netfilter fixes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080219162536.13631.48348.sendpatchset@localhost.localdomain \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.