summaryrefslogtreecommitdiff
path: root/nest/iface.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1998-10-17 11:05:18 +0000
committerMartin Mares <mj@ucw.cz>1998-10-17 11:05:18 +0000
commit47b793064c25c8adcab48cacc018be1675f2448a (patch)
treec6924c3fb31bf8cd7d650ad8e6c52c395457eca9 /nest/iface.c
parentd92882be9b1bfcc1a8e8a7bd552bdec4831694aa (diff)
Solve chicken-and-egg problems with protocol startup. We now queue all inactive
protocols and don't send route/interface updates to them and when they come up, we resend the whole route/interface tables privately. Removed the "scan interface list after protocol start" work-around.
Diffstat (limited to 'nest/iface.c')
-rw-r--r--nest/iface.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/nest/iface.c b/nest/iface.c
index 591733a1..f6f33a99 100644
--- a/nest/iface.c
+++ b/nest/iface.c
@@ -313,6 +313,18 @@ if_end_update(void)
}
void
+if_feed_baby(struct proto *p)
+{
+ struct iface *i;
+
+ if (!p->if_notify)
+ return;
+ debug("Announcing interfaces to new protocol %s\n", p->name);
+ WALK_LIST(i, iface_list)
+ p->if_notify(p, IF_CHANGE_CREATE | ((i->flags & IF_UP) ? IF_CHANGE_UP : 0), NULL, i);
+}
+
+void
if_init(void)
{
if_pool = rp_new(&root_pool, "Interfaces");