From: Phil Oester <kernel@linuxace.com>
To: Bart De Schuymer <bdschuym@pandora.be>
Cc: Patrick McHardy <kaber@trash.net>,
Bart De Schuymer <bdschuym@telenet.be>,
Herbert Xu <herbert@gondor.apana.org.au>,
netfilter-devel@lists.netfilter.org,
linux-kernel@vger.kernel.org, rankincj@yahoo.com,
ebtables-devel@lists.sourceforge.net, netfilter-devel@manty.net
Subject: Re: 2.6.12: connection tracking broken?
Date: Mon, 20 Jun 2005 11:57:36 -0700 [thread overview]
Message-ID: <20050620185736.GA4883@linuxace.com> (raw)
In-Reply-To: <1119293193.3381.9.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 591 bytes --]
The changes were originally made to fix conntrack unload problems with
raw sockets. My original patch performed the nf_reset in the socket
code, but Patrick suggested moving it to ip_output. The below patch
reverts the ip_output changes, and implements the original suggested
changes to raw socket handling.
While this is unlikely to be the permanent solution, it will fix the
current bridging problems while retaining the raw socket fixes. I'd
suggest that this could be included in -stable while researching
other solutions.
Phil
Signed-off-by: Phil Oester <kernel@linuxace.com>
[-- Attachment #2: patch-fixbridge --]
[-- Type: text/plain, Size: 1938 bytes --]
diff -purN linux-orig/net/ipv4/ip_output.c linux-new/net/ipv4/ip_output.c
--- linux-orig/net/ipv4/ip_output.c 2005-06-17 15:48:29.000000000 -0400
+++ linux-new/net/ipv4/ip_output.c 2005-06-20 14:47:58.000000000 -0400
@@ -196,8 +196,6 @@ static inline int ip_finish_output2(stru
nf_debug_ip_finish_output2(skb);
#endif /*CONFIG_NETFILTER_DEBUG*/
- nf_reset(skb);
-
if (hh) {
int hh_alen;
diff -purN linux-orig/net/ipv4/netfilter/ip_conntrack_standalone.c linux-new/net/ipv4/netfilter/ip_conntrack_standalone.c
--- linux-orig/net/ipv4/netfilter/ip_conntrack_standalone.c 2005-06-17 15:48:29.000000000 -0400
+++ linux-new/net/ipv4/netfilter/ip_conntrack_standalone.c 2005-06-20 14:47:58.000000000 -0400
@@ -432,6 +432,13 @@ static unsigned int ip_conntrack_defrag(
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
+#if !defined(CONFIG_IP_NF_NAT) && !defined(CONFIG_IP_NF_NAT_MODULE)
+ /* Previously seen (loopback)? Ignore. Do this before
+ fragment check. */
+ if ((*pskb)->nfct)
+ return NF_ACCEPT;
+#endif
+
/* Gather fragments. */
if ((*pskb)->nh.iph->frag_off & htons(IP_MF|IP_OFFSET)) {
*pskb = ip_ct_gather_frags(*pskb,
diff -purN linux-orig/net/packet/af_packet.c linux-new/net/packet/af_packet.c
--- linux-orig/net/packet/af_packet.c 2005-06-17 15:48:29.000000000 -0400
+++ linux-new/net/packet/af_packet.c 2005-06-20 14:48:38.000000000 -0400
@@ -274,6 +274,9 @@ static int packet_rcv_spkt(struct sk_buf
dst_release(skb->dst);
skb->dst = NULL;
+ /* drop conntrack reference */
+ nf_reset(skb);
+
spkt = (struct sockaddr_pkt*)skb->cb;
skb_push(skb, skb->data-skb->mac.raw);
@@ -517,6 +520,9 @@ static int packet_rcv(struct sk_buff *sk
dst_release(skb->dst);
skb->dst = NULL;
+ /* drop conntrack reference */
+ nf_reset(skb);
+
spin_lock(&sk->sk_receive_queue.lock);
po->stats.tp_packets++;
__skb_queue_tail(&sk->sk_receive_queue, skb);
next prev parent reply other threads:[~2005-06-20 19:03 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-18 12:43 2.6.12: connection tracking broken? Chris Rankin
2005-06-18 14:57 ` Jan Engelhardt
2005-06-18 15:14 ` Tobias DiPasquale
2005-06-18 17:16 ` Chris Rankin
2005-06-20 7:19 ` Harald Welte
2005-06-18 19:25 ` Santiago Garcia Mantinan
2005-06-18 22:12 ` Santiago Garcia Mantinan
2005-06-19 13:05 ` Patrick McHardy
2005-06-20 0:05 ` Herbert Xu
2005-06-20 0:18 ` David S. Miller
2005-06-20 0:50 ` Herbert Xu
2005-06-20 2:45 ` Patrick McHardy
2005-06-20 6:39 ` Bart De Schuymer
2005-06-20 12:15 ` Patrick McHardy
2005-06-20 18:46 ` Bart De Schuymer
2005-06-20 18:57 ` Phil Oester [this message]
2005-06-20 23:27 ` Patrick McHardy
2005-06-20 23:22 ` Patrick McHardy
2005-06-21 7:19 ` Bart De Schuymer
2005-06-21 15:16 ` Patrick McHardy
2005-06-21 20:46 ` Bart De Schuymer
2005-06-21 21:23 ` Chris Wright
2005-06-21 22:32 ` David S. Miller
2005-06-21 22:34 ` Chris Wright
2005-06-22 0:26 ` Patrick McHardy
2005-06-22 22:58 ` Chris Rankin
2005-06-23 17:42 ` Patrick McHardy
2005-06-23 19:49 ` David S. Miller
2005-06-24 8:39 ` Patrick McHardy
2005-06-28 23:07 ` David S. Miller
2005-06-22 0:45 ` Patrick McHardy
2005-06-22 21:49 ` Herbert Xu
2005-06-23 0:02 ` Carl-Daniel Hailfinger
2005-06-23 3:31 ` Patrick McHardy
2005-06-23 6:27 ` [Ebtables-devel] " Bart De Schuymer
2005-06-23 3:26 ` Patrick McHardy
2005-06-23 3:53 ` Herbert Xu
2005-06-23 6:23 ` Bart De Schuymer
2005-06-27 8:32 ` Harald Welte
2005-06-27 11:46 ` 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=20050620185736.GA4883@linuxace.com \
--to=kernel@linuxace.com \
--cc=bdschuym@pandora.be \
--cc=bdschuym@telenet.be \
--cc=ebtables-devel@lists.sourceforge.net \
--cc=herbert@gondor.apana.org.au \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=netfilter-devel@manty.net \
--cc=rankincj@yahoo.com \
/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