All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bridge] large packet size doesn't work
@ 2006-04-19  7:34 Fulvio Ricciardi
  2006-04-19 16:29 ` Stephen Hemminger
  2006-04-19 17:04 ` Stephen Hemminger
  0 siblings, 2 replies; 3+ messages in thread
From: Fulvio Ricciardi @ 2006-04-19  7:34 UTC (permalink / raw)
  To: bridge

Hi,
I have just configured a Linux box with kernel 2.6.16.7 and configured two 
ethernet interfaces (with MTU 1500) in bridge mode. CONFIG_BRIDGE_NETFILTER 
is enabled.
The problem is that ping -s 1500 192.168.0.2 doesn't work from 192.168.0.1 
if the systems are separated by the bridge. Normal ping with smaller packet 
size works ok.
What is wrong? 

Best Regards
 Fulvio Ricciardi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bridge] large packet size doesn't work
  2006-04-19  7:34 [Bridge] large packet size doesn't work Fulvio Ricciardi
@ 2006-04-19 16:29 ` Stephen Hemminger
  2006-04-19 17:04 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2006-04-19 16:29 UTC (permalink / raw)
  To: Fulvio Ricciardi; +Cc: bridge

On Wed, 19 Apr 2006 09:34:23 +0200
"Fulvio Ricciardi" <fulvio.ricciardi@zeroshell.net> wrote:

> Hi,
> I have just configured a Linux box with kernel 2.6.16.7 and configured two 
> ethernet interfaces (with MTU 1500) in bridge mode. CONFIG_BRIDGE_NETFILTER 
> is enabled.
> The problem is that ping -s 1500 192.168.0.2 doesn't work from 192.168.0.1 
> if the systems are separated by the bridge. Normal ping with smaller packet 
> size works ok.
> What is wrong? 
> 
> Best Regards
>  Fulvio Ricciardi
> _______________________________________________
> Bridge mailing list
> Bridge@lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/bridge

Are you using VLAN's ? The bridge will not send packets to a device if
packet size > mtu of device.  VLAN's confuse it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bridge] large packet size doesn't work
  2006-04-19  7:34 [Bridge] large packet size doesn't work Fulvio Ricciardi
  2006-04-19 16:29 ` Stephen Hemminger
@ 2006-04-19 17:04 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2006-04-19 17:04 UTC (permalink / raw)
  To: Fulvio Ricciardi; +Cc: bridge

Try the following if you are using vlan's

--- bridge.orig/net/bridge/br_forward.c	2006-04-10 16:17:51.000000000 -0700
+++ bridge/net/bridge/br_forward.c	2006-04-19 10:03:58.000000000 -0700
@@ -16,6 +16,7 @@
 #include <linux/kernel.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
+#include <linux/if_vlan.h>
 #include <linux/netfilter_bridge.h>
 #include "br_private.h"
 
@@ -29,11 +30,17 @@
 	return 1;
 }
 
+static inline unsigned eth_length(const struct sk_buff *skb)
+{
+	return skb->protocol == htons(ETH_P_8021Q)
+		? skb->len - VLAN_HLEN : skb->len;
+}
+
 int br_dev_queue_push_xmit(struct sk_buff *skb)
 {
-	/* drop mtu oversized packets except tso */
-	if (skb->len > skb->dev->mtu && !skb_shinfo(skb)->tso_size)
-		kfree_skb(skb);
+	/* drop mtu oversized packets except tso (local) and allow vlan's */
+	if (eth_length(skb) > skb->dev->mtu && !skb_shinfo(skb)->tso_size)
+		dev_kfree_skb(skb);
 	else {
 #ifdef CONFIG_BRIDGE_NETFILTER
 		/* ip_refrag calls ip_fragment, doesn't copy the MAC header. */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-19 17:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-19  7:34 [Bridge] large packet size doesn't work Fulvio Ricciardi
2006-04-19 16:29 ` Stephen Hemminger
2006-04-19 17:04 ` Stephen Hemminger

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.