summaryrefslogtreecommitdiffstats
path: root/nest/iface.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-02-27 16:00:07 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-02-27 16:00:07 +0100
commit53434e44a95fe9334f4bdf5e0da987929addffb1 (patch)
tree75317dd53e6059b7c6fe0941312adc2e317c46eb /nest/iface.c
parent3075824dbd4bb654e98614dfd9992ceec0428beb (diff)
downloadbird-53434e44a95fe9334f4bdf5e0da987929addffb1.tar
bird-53434e44a95fe9334f4bdf5e0da987929addffb1.zip
Better flushing of interfaces.
When device protocol goes down, interfaces should be flushed asynchronously (in the same way like routes from protocols are flushed), when protocol goes to DOWN/HUNGRY. This fixes the problem with static routes staying in kernel routing table after BIRD shutdown.
Diffstat (limited to 'nest/iface.c')
-rw-r--r--nest/iface.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/nest/iface.c b/nest/iface.c
index 5e88b21..82dead3 100644
--- a/nest/iface.c
+++ b/nest/iface.c
@@ -336,6 +336,15 @@ if_end_update(void)
}
}
+void
+if_flush_ifaces(struct proto *p)
+{
+ if (p->debug & D_EVENTS)
+ log(L_TRACE "%s: Flushing interfaces", p->name);
+ if_start_update();
+ if_end_update();
+}
+
/**
* if_feed_baby - advertise interfaces to a new protocol
* @p: protocol to feed