All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: Bridge@lists.linux-foundation.org,
	Bart De Schuymer <bdschuym@pandora.be>
Subject: Re: [Bridge] [RFC patch] allow IP address on enslaved interfaces
Date: Tue, 30 Mar 2010 08:22:28 -0700	[thread overview]
Message-ID: <20100330082228.2b377572@nehalam> (raw)
In-Reply-To: <OFC050A0FC.1BF55EDB-ONC12576F6.002669E3-C12576F6.00281EEA@transmode.se>

On Tue, 30 Mar 2010 09:18:13 +0200
Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:

> 
> This quick hack lets me use an IP address on an enslaved interface:
>  #eth1 has IP 192.168.1.16
>  brctl addbr br0
>  brctl setfd br0 0
>  ifconfig br0 up
>  brctl addif br0 eth1
> 
> After this I can use eth1 as if it was the br0 interface.
> This obviously needs cleanup(skb->cb[42] = 99 needs to be fixed)
> I probably broke something else too :(
> Is this useful for someone else too?
> 
>           Jocke
> 
> diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
> index 1a99c4e..60d04eb 100644
> --- a/net/bridge/br_device.c
> +++ b/net/bridge/br_device.c
> @@ -32,6 +32,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
>  	skb_reset_mac_header(skb);
>  	skb_pull(skb, ETH_HLEN);
> 
> +	skb->cb[42] = 99;
>

Using skb->cb is an ugly hack and won't work if qdisc modifies.
So sorry no.

  reply	other threads:[~2010-03-30 15:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30  7:18 [Bridge] [RFC patch] allow IP address on enslaved interfaces Joakim Tjernlund
2010-03-30 15:22 ` Stephen Hemminger [this message]
2010-03-30 16:42   ` Joakim Tjernlund

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=20100330082228.2b377572@nehalam \
    --to=shemminger@linux-foundation.org \
    --cc=Bridge@lists.linux-foundation.org \
    --cc=bdschuym@pandora.be \
    --cc=joakim.tjernlund@transmode.se \
    /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 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.