summaryrefslogtreecommitdiff
path: root/nest/iface.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1998-06-04 20:30:11 +0000
committerMartin Mares <mj@ucw.cz>1998-06-04 20:30:11 +0000
commit620a355a15d65a8a2980f98b2de3e7d04c3dab62 (patch)
tree8c616039ccb93a8fcde4e56359efcb231211dcee /nest/iface.c
parent236d4eb8ce5dc894e97bcf1f561186d41c361cea (diff)
Now sending IF_CHANGE_CREATE when a new interface appears and IF_CHANGE_UP
only if it's really up.
Diffstat (limited to 'nest/iface.c')
-rw-r--r--nest/iface.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nest/iface.c b/nest/iface.c
index 3f21c435..41cb05bb 100644
--- a/nest/iface.c
+++ b/nest/iface.c
@@ -193,7 +193,7 @@ if_dump_all(void)
{
struct iface *i;
- debug("Known network interfaces:\n\n");
+ debug("Known network interfaces:\n");
WALK_LIST(i, iface_list)
if_dump(i);
debug("\n");
@@ -292,7 +292,8 @@ newif:
memcpy(i, new, sizeof(*i));
i->flags |= IF_UPDATED;
add_tail(&iface_list, &i->n);
- if_notify_change(IF_CHANGE_UP | IF_CHANGE_FLAGS | IF_CHANGE_MTU, NULL, i);
+ if_notify_change(IF_CHANGE_CREATE | ((i->flags & IF_UP) ? IF_CHANGE_UP : 0)
+ | IF_CHANGE_FLAGS | IF_CHANGE_MTU, NULL, i);
}
void