On Fri, Nov 04, 2005 at 11:08:32PM -0800, Jason R. Martin wrote: > On 11/4/05, Neil Horman <[EMAIL PROTECTED]> wrote: > > On Fri, Nov 04, 2005 at 12:25:49PM -0800, Jay Vosburgh wrote: > > > > > > [dropped linux-kernel; added netdev] > > > > > > Neil Horman <[EMAIL PROTECTED]> wrote: > > > > > > >The current version of ifenslave fails to attach slave interfaces to a > > > >bond if > > > >the masters doesn't have appropriate IP information. While its common > > > >for > > > >bonded interface to have IP information its not required (bond as part > > > >of a > > > >bridge for instance). > > > > > > As far as I know, attaching slaves to a bonding device without > > > an IP address works just fine; the bonding master device must merely be > > > up. Under what circumstances are you seeing a problem? > > > > > Try to run ifenslave on a bonded interface with no ip address, it will fail. > > Are you sure it fails or do you just get an error message? > Traditionally it has spit out a (non-fatal) error message about not > being able to get the address info, but then go ahead and enslave > anyway. > > At least that's been my experience. > > Jason Hey, I just checked the code on this, and it appears that the ensalve opperation aborts in the event that the masters ip address info isn't present. This means that any of the subsequent operations that ensalve preforms, wont happen, which can break the bond. This include propogation of the MTU size, setting of the master MAC address, and most importantly, setting of the IFF_SLAVE flag on the slave interfaces. So having no IP address on a bond interface with an abi version less than two definately will not be able to enslave any physical interfaces, which is what I'm currently seeing. I'm still looking into the use of an updated bonding driver in my specific situation, but I think in light of this info, the right thing to do is probably to make the enslave function not fail if set_if_addr fails, as the patch attached does
Thanks and Regards Neil Signed-off-by: Neil Horman <[EMAIL PROTECTED]> ifenslave.c | 1 - 1 files changed, 1 deletion(-) diff --git a/Documentation/networking/ifenslave.c b/Documentation/networking/ifenslave.c --- a/Documentation/networking/ifenslave.c +++ b/Documentation/networking/ifenslave.c @@ -698,7 +698,6 @@ static int enslave(char *master_ifname, fprintf(stderr, "Slave '%s': Error: set address failed\n", slave_ifname); - return res; } } else { res = clear_if_addr(slave_ifname); - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html