* iproute2 question on flushing addresses
@ 2010-08-11 17:01 Ben Greear
0 siblings, 0 replies; only message in thread
From: Ben Greear @ 2010-08-11 17:01 UTC (permalink / raw)
To: NetDev
I am trying to flush all secondary IPs before flushing primaries, because
otherwise it creates a flood of netlink messages as each primary is deleted
and a secondary takes over as primary (changing all routes for all other
secondaries).
I was thinking this command could work, but it does not appear to do
anything:
./local/sbin/ip addr flush dev rddVR17 secondary
While poking at the code..I saw this. It seems to me that the check for IFA_F_SECONDARY
is reversed?
int print_addrinfo_primary(const struct sockaddr_nl *who, struct nlmsghdr *n,
void *arg)
{
struct ifaddrmsg *ifa = NLMSG_DATA(n);
if (!ifa->ifa_flags & IFA_F_SECONDARY)
return 0;
return print_addrinfo(who, n, arg);
}
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-11 17:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-11 17:01 iproute2 question on flushing addresses Ben Greear
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).