diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-12-08 01:09:26 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-12-09 05:58:32 +0100 |
commit | b95254f5391542985202b64353c0d0dd6a28ecf7 (patch) | |
tree | f5ff53574e859f24db2ef04f96b5f27f6dea73fb /nest/iface.c | |
parent | 2779d50a24dc1b7c6b4cf83a17af817c02462855 (diff) | |
download | bird-b95254f5391542985202b64353c0d0dd6a28ecf7.tar bird-b95254f5391542985202b64353c0d0dd6a28ecf7.zip |
Update the neighbor cache on every address addition or removal
Only updating the cache when an interface goes up or down leaves it unaware
of addresses that are added or removed without taking the interface down.
Diffstat (limited to 'nest/iface.c')
-rw-r--r-- | nest/iface.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nest/iface.c b/nest/iface.c index 2ff2611..2c61680 100644 --- a/nest/iface.c +++ b/nest/iface.c @@ -157,8 +157,14 @@ ifa_notify_change(unsigned c, struct ifa *a) struct proto *p; DBG("IFA change notification (%x) for %s:%I\n", c, a->iface->name, a->ip); + if (c & IF_CHANGE_UP) + neigh_ifa_update(a); + WALK_LIST(p, active_proto_list) ifa_send_notify(p, c, a); + + if (c & IF_CHANGE_DOWN) + neigh_ifa_update(a); } static inline void @@ -195,8 +201,6 @@ if_notify_change(unsigned c, struct iface *i) if_dump(i); #endif - if (c & IF_CHANGE_UP) - neigh_if_up(i); if (c & IF_CHANGE_DOWN) WALK_LIST(a, i->addrs) { @@ -216,9 +220,6 @@ if_notify_change(unsigned c, struct iface *i) if ((c & (IF_CHANGE_UP | IF_CHANGE_DOWN | IF_CHANGE_LINK)) == IF_CHANGE_LINK) neigh_if_link(i); - - if (c & IF_CHANGE_DOWN) - neigh_if_down(i); } static unsigned |