netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: shemminger@linux-foundation.org, netdev@vger.kernel.org,
	tbillman@gmail.com
Subject: Re: [PATCH,RFC] bridge: call eth_type_trans() in br_pass_frame_up()
Date: Mon, 26 Feb 2007 10:40:31 -0800	[thread overview]
Message-ID: <20070226104031.09930077@freekitty> (raw)
In-Reply-To: <20061018091445.GB18850@xi.wantstofly.org>

On Wed, 18 Oct 2006 11:14:45 +0200
Lennert Buytenhek <buytenh@wantstofly.org> wrote:

> Hi,
> 
> I've been seeing a failure to reply to incoming ARP packets on a bridge
> interface until after the first few packets have been transmitted over
> that interface, and the patch below seems to fix the issue, the 'issue'
> being that the incoming ARP packets are marked with PACKET_OTHERHOST,
> and there not being anything to set that back to PACKET_HOST even if
> the destination MAC address matches the bridge interface's MAC address.
> 
> If this looks good, I'll prepare a proper commit message.
> 
> 
> cheers,
> Lennert
> 
> Signed-off-by: Tom Billman <tbillman@gmail.com>
> Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
> 
> --- linux-2.6.19-rc2.orig/net/bridge/br_input.c	2006-10-18 11:11:08.000000000 +0200
> +++ linux-2.6.19-rc2/net/bridge/br_input.c	2006-10-18 11:10:08.000000000 +0200
> @@ -32,6 +32,9 @@
>  	indev = skb->dev;
>  	skb->dev = br->dev;
>  
> +	skb_push(skb, ETH_HLEN);
> +	skb->protocol = eth_type_trans(skb, skb->dev);
> +
>  	NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, indev, NULL,
>  		netif_receive_skb);
>  }

No, eth_type_trans already be called by the device in the receive path.
Looks like a device driver bug, not a bridge issue.  If you add this,
the code ends up doing eth_type_trans twice.

-- 
Stephen Hemminger <shemminger@linux-foundation.org>

      parent reply	other threads:[~2007-02-26 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-18  9:14 [PATCH,RFC] bridge: call eth_type_trans() in br_pass_frame_up() Lennert Buytenhek
2006-10-18 16:37 ` Stephen Hemminger
2007-02-26 18:40 ` Stephen Hemminger [this message]

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=20070226104031.09930077@freekitty \
    --to=shemminger@linux-foundation.org \
    --cc=buytenh@wantstofly.org \
    --cc=netdev@vger.kernel.org \
    --cc=tbillman@gmail.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;
as well as URLs for NNTP newsgroup(s).