Re: primary and secondary ip addresses
From: Thomas Graf <tgraf@suug.ch>
Date: 2005-05-26 18:21:46
* Harald Welte [ref] 2005-05-26 20:11
David, would you consider applying that patch to mainline? I think there was concensus on this solution, and it has now received some amount of testing by Hasso and me.
I agree, I've been running this patch for 3 weeks now without any problems. Two comments below.
quoted hunk ↗ jump to hunk
@@ -281,6 +289,13 @@ if (!in_dev->ifa_list) inetdev_destroy(in_dev); } + + if (promote && IN_DEV_PROMOTE_SECONDARIES(in_dev)) {
promote can only be !=NULL if promotion is enabled, no?
+ /* not sure if we should send a delete notify first? */ + promote->ifa_flags &= ~IFA_F_SECONDARY; + rtmsg_ifa(RTM_NEWADDR, promote);
This can be improved, however sending a delete/add seems inappropriate. I've patch prepared to add a change mask which will give us the proper methods to do this right but for now this is just fine I guess.