Re: [RFC patch] allow IP address on enslaved interfaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 30 Mar 2010 09:18:13 +0200
Joakim Tjernlund <joakim.tjernlund@xxxxxxxxxxxx> 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.
_______________________________________________
Bridge mailing list
Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/bridge

[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux