diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-11-11 12:24:27 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-11-11 12:24:27 +0100 |
commit | fe181e7c63843ad65401cc1e400ae1ac3187122f (patch) | |
tree | df37b8d76084521bb33e749a70ea85f04f19e16d /nest/neighbor.c | |
parent | f25cb0ef9f6341648513e793a3162b32fc250d2b (diff) | |
download | bird-fe181e7c63843ad65401cc1e400ae1ac3187122f.tar bird-fe181e7c63843ad65401cc1e400ae1ac3187122f.zip |
Adds support for iface link check to static protocol.
Diffstat (limited to 'nest/neighbor.c')
-rw-r--r-- | nest/neighbor.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/nest/neighbor.c b/nest/neighbor.c index 7e7cc49..785b1d4 100644 --- a/nest/neighbor.c +++ b/nest/neighbor.c @@ -278,6 +278,28 @@ neigh_if_down(struct iface *i) } } +/** + * neigh_if_link - notify neighbor cache about interface link change + * @i: the interface in question + * + * Notify the neighbor cache that an interface changed link state. + * All owners of neighbor entries connected to this interface are + * notified. + */ + +void +neigh_if_link(struct iface *i) +{ + node *x, *y; + + WALK_LIST_DELSAFE(x, y, i->neighbors) + { + neighbor *n = SKIP_BACK(neighbor, if_n, x); + if (n->proto->neigh_notify && n->proto->core_state != FS_FLUSHING) + n->proto->neigh_notify(n); + } +} + static inline void neigh_prune_one(neighbor *n) { |