From: Jan Engelhardt <jengelh@medozas.de>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@vger.kernel.org,
YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Subject: [PATCH 2/6] netfilter: ipv6: add IPSKB_REROUTED exclusion to NF_HOOK/POSTROUTING invocation
Date: Wed, 7 Apr 2010 20:50:12 +0200 [thread overview]
Message-ID: <1270666217-27670-3-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1270666217-27670-1-git-send-email-jengelh@medozas.de>
Similar to how IPv4's ip_output.c works, have ip6_output also check
the IPSKB_REROUTED flag. It will be set from xt_TEE for cloned packets
since Xtables can currently only deal with a single packet in flight
at a time.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Acked-by: David S. Miller <davem@davemloft.net>
---
net/ipv6/ip6_output.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index f314ba4..7e10f62 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -172,8 +172,9 @@ int ip6_output(struct sk_buff *skb)
return 0;
}
- return NF_HOOK(NFPROTO_IPV6, NF_INET_POST_ROUTING, skb, NULL, dev,
- ip6_finish_output);
+ return NF_HOOK_COND(NFPROTO_IPV6, NF_INET_POST_ROUTING, skb, NULL, dev,
+ ip6_finish_output,
+ !(IP6CB(skb)->flags & IPSKB_REROUTED));
}
/*
--
1.7.0.2
next prev parent reply other threads:[~2010-04-07 18:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-07 18:50 nf-next: TEE/reentrancy 20100407 Jan Engelhardt
2010-04-07 18:50 ` [PATCH 1/6] netfilter: ipv6: move POSTROUTING invocation before fragmentation Jan Engelhardt
2010-04-07 18:50 ` Jan Engelhardt [this message]
2010-04-07 18:50 ` [PATCH 3/6] netfilter: xtables: inclusion of xt_TEE Jan Engelhardt
2010-04-07 18:50 ` [PATCH 4/6] netfilter: xtables2: make ip_tables reentrant Jan Engelhardt
2010-04-13 9:57 ` Patrick McHardy
2010-04-13 10:50 ` Jan Engelhardt
2010-04-13 10:51 ` Patrick McHardy
2010-04-13 11:12 ` Jan Engelhardt
2010-04-13 11:15 ` Patrick McHardy
2010-04-13 11:42 ` Jan Engelhardt
2010-04-13 12:29 ` Patrick McHardy
2010-04-07 18:50 ` [PATCH 5/6] netfilter: xt_TEE: have cloned packet travel through Xtables too Jan Engelhardt
2010-04-13 10:00 ` Patrick McHardy
2010-04-13 10:51 ` Jan Engelhardt
2010-04-13 10:53 ` Patrick McHardy
2010-04-13 12:38 ` Eric Dumazet
2010-04-07 18:50 ` [PATCH 6/6] netfilter: xtables: remove old comments about reentrancy Jan Engelhardt
2010-04-09 9:39 ` nf-next: TEE/reentrancy 20100407 Jan Engelhardt
2010-04-09 14:53 ` Patrick McHardy
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=1270666217-27670-3-git-send-email-jengelh@medozas.de \
--to=jengelh@medozas.de \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).