summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/ldpe.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ldpd/ldpe.c')
-rw-r--r--usr.sbin/ldpd/ldpe.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/usr.sbin/ldpd/ldpe.c b/usr.sbin/ldpd/ldpe.c
index e97ee27fa7a..353060b41ec 100644
--- a/usr.sbin/ldpd/ldpe.c
+++ b/usr.sbin/ldpd/ldpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpe.c,v 1.29 2015/03/21 18:29:22 renato Exp $ */
+/* $OpenBSD: ldpe.c,v 1.30 2015/03/21 18:32:01 renato Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -264,10 +264,6 @@ ldpe_shutdown(void)
/* stop all interfaces */
while ((iface = LIST_FIRST(&leconf->iface_list)) != NULL) {
- if (if_fsm(iface, IF_EVT_DOWN)) {
- log_debug("error stopping interface %s",
- iface->name);
- }
LIST_REMOVE(iface, entry);
if_del(iface);
}
@@ -346,8 +342,6 @@ ldpe_dispatch_main(int fd, short event, void *bula)
switch (imsg.hdr.type) {
case IMSG_IFSTATUS:
- case IMSG_IFUP:
- case IMSG_IFDOWN:
if (imsg.hdr.len != IMSG_HEADER_SIZE +
sizeof(struct kif))
fatalx("IFINFO imsg with wrong len");
@@ -359,16 +353,7 @@ ldpe_dispatch_main(int fd, short event, void *bula)
iface->flags = kif->flags;
iface->linkstate = kif->link_state;
- switch (imsg.hdr.type) {
- case IMSG_IFUP:
- if_fsm(iface, IF_EVT_UP);
- break;
- case IMSG_IFDOWN:
- if_fsm(iface, IF_EVT_DOWN);
- break;
- default:
- break;
- }
+ if_update(iface);
break;
case IMSG_NEWADDR:
if (imsg.hdr.len != IMSG_HEADER_SIZE +
@@ -395,7 +380,7 @@ ldpe_dispatch_main(int fd, short event, void *bula)
if (iface) {
LIST_INSERT_HEAD(&iface->addr_list, if_addr,
iface_entry);
- if_fsm(iface, IF_EVT_NEWADDR);
+ if_update(iface);
}
break;
case IMSG_DELADDR:
@@ -417,7 +402,7 @@ ldpe_dispatch_main(int fd, short event, void *bula)
iface = if_lookup(kaddr->ifindex);
if (iface) {
LIST_REMOVE(if_addr, iface_entry);
- if_fsm(iface, IF_EVT_DELADDR);
+ if_update(iface);
}
RB_FOREACH(nbr, nbr_id_head, &nbrs_by_id) {