lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4945E636.20605@gslab.com>
Date:	Mon, 15 Dec 2008 10:38:06 +0530
From:	Poornima Kamath <poornimak@...ab.com>
To:	Jay Vosburgh <fubar@...ibm.com>
CC:	netdev@...r.kernel.org
Subject: Re: Detecting backup slaves of bonding interface in network driver

Hi Jay,

Thanks for your reply.
The driver creates virtual interfaces that talk to ethernet interfaces 
over infiniband,  using an infiniband to ethernet gateway device.
The gateway device sends data to all interfaces having same mac 
address.  For this the driver needs to explicitly tell the gateway 
device not to send data to the backup slaves.
Therefore the driver needs to  know which slaves are backup slaves.
The failover mac option  works well,  but it is present for kernels 
greater than 2.6.24.  So this option is not available for distros like 
RHEL5, SLES10 etc
So in order to support these distros I need some way of identifying the 
backup slaves.
Is it ok to check the IFF_SLAVE_INACTIVE flags for these distros?

Thanks,
Poornima

Jay Vosburgh wrote:
> Poornima Kamath <poornimak@...ab.com> wrote:
>
>   
>> I have a network driver which creates virtual ethernet interfaces. I am
>> using the bonding driver in the active backup mode for failover.
>> I want to detect the interfaces which are backup slaves in the driver.
>>     
>
> 	What device is it, and why do you want to do this?
>
> 	I ask not just out of curiosity, but because there are other
> devices that have problems with bonding's handling of some things, and
> there are already special options for those devices.  If your device,
> e.g., can't handle having the same MAC on multiple ports, then your
> problem may be resolved with one of the fail_over_mac option settings.
>
>   
>> I found that the  bonding driver sets the IFF_SLAVE_INACTIVE private flag
>> of net_device structure for all the backup slaves.
>> But I dont see any callbacks in my driver when this flag is set.
>> I am planning to check the netdevice flags in the driver. Is it
>> recommended to check the private flags of net_device ?
>> Or is there some better way in which I can find the backup slaves?
>>     
>
> 	Those flags are private to the driver (bonding, in this case),
> and there is no callback generated when they change.  The
> IFF_SLAVE_INACTIVE is what you want (it's set in priv_flags for backup
> slaves), but it's purpose is to identify backup slaves so that most
> incoming packets on them can be dropped.  It's possible that the flag
> may change or be eliminated in the future.
>
> 	Also, note that there is a notifier generated by bonding when a
> failover occurs (NETDEV_BONDING_FAILOVER), this was added to the
> mainline about six months ago.  You may be able to use that to determine
> when to check things.
>
> 	-J
>
> ---
> 	-Jay Vosburgh, IBM Linux Technology Center, fubar@...ibm.com
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>   

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ