Patchwork [Bugme-new,Bug,12327] New: Intermittent TCP issues with => 2.6.27

login
register
mail settings
Submitter Herbert Xu
Date Jan. 9, 2009, 11:55 a.m.
Message ID <20090109115515.GA12486@gondor.apana.org.au>
Download mbox | patch
Permalink /patch/17501/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Herbert Xu - Jan. 9, 2009, 11:55 a.m.
Hi:

It turns out that even though we have sysctl's that's supposed
to control pppoe/vlan processing, they don't actually work.

This patch should make them work.

bridge: Fix handling of non-IP packets in FORWARD/POST_ROUTING

Currently the bridge FORWARD/POST_ROUTING chains treats all
non-IPv4 packets as IPv6.  This packet fixes that by returning
NF_ACCEPT on non-IP packets instead, just as is done in PRE_ROUTING.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>


Cheers,
Patrick McHardy - Jan. 12, 2009, 5:27 a.m.
Herbert Xu wrote:
> It turns out that even though we have sysctl's that's supposed
> to control pppoe/vlan processing, they don't actually work.

Which reminds me - I think we should change them to default to off,
they regulary break things for unsuspecting users. I'm not sure
though what the best way to warn people for a while would be,
feature-removal-schedule doesn't seem approriate.

> This patch should make them work.
> 
> bridge: Fix handling of non-IP packets in FORWARD/POST_ROUTING
> 
> Currently the bridge FORWARD/POST_ROUTING chains treats all
> non-IPv4 packets as IPv6.  This packet fixes that by returning
> NF_ACCEPT on non-IP packets instead, just as is done in PRE_ROUTING.

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index a65e43a..9a1cd75 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -686,8 +686,11 @@  static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff *skb,
 	if (skb->protocol == htons(ETH_P_IP) || IS_VLAN_IP(skb) ||
 	    IS_PPPOE_IP(skb))
 		pf = PF_INET;
-	else
+	else if (skb->protocol == htons(ETH_P_IPV6) || IS_VLAN_IPV6(skb) ||
+		 IS_PPPOE_IPV6(skb))
 		pf = PF_INET6;
+	else
+		return NF_ACCEPT;
 
 	nf_bridge_pull_encap_header(skb);
 
@@ -828,8 +831,11 @@  static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff *skb,
 	if (skb->protocol == htons(ETH_P_IP) || IS_VLAN_IP(skb) ||
 	    IS_PPPOE_IP(skb))
 		pf = PF_INET;
-	else
+	else if (skb->protocol == htons(ETH_P_IPV6) || IS_VLAN_IPV6(skb) ||
+		 IS_PPPOE_IPV6(skb))
 		pf = PF_INET6;
+	else
+		return NF_ACCEPT;
 
 #ifdef CONFIG_NETFILTER_DEBUG
 	if (skb->dst == NULL) {