summaryrefslogtreecommitdiffstats
path: root/ldpd/ldp_zebra.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldpd/ldp_zebra.c')
-rw-r--r--ldpd/ldp_zebra.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ldpd/ldp_zebra.c b/ldpd/ldp_zebra.c
index 6fcb27337..fde6e56c6 100644
--- a/ldpd/ldp_zebra.c
+++ b/ldpd/ldp_zebra.c
@@ -64,7 +64,7 @@ ifp2kif(struct interface *ifp, struct kif *kif)
memset(kif, 0, sizeof(*kif));
strlcpy(kif->ifname, ifp->name, sizeof(kif->ifname));
kif->ifindex = ifp->ifindex;
- kif->flags = ifp->flags;
+ kif->operative = if_is_operative(ifp);
if (ifp->ll_type == ZEBRA_LLT_ETHER)
memcpy(kif->mac, ifp->hw_addr, ETHER_ADDR_LEN);
}
@@ -262,7 +262,6 @@ ldp_interface_status_change(int command, struct zclient *zclient,
struct connected *ifc;
struct kif kif;
struct kaddr ka;
- int link_new;
/*
* zebra_interface_state_read() updates interface structure in
@@ -277,8 +276,7 @@ ldp_interface_status_change(int command, struct zclient *zclient,
ifp2kif(ifp, &kif);
main_imsg_compose_both(IMSG_IFSTATUS, &kif, sizeof(kif));
- link_new = (ifp->flags & IFF_UP) && (ifp->flags & IFF_RUNNING);
- if (link_new) {
+ if (if_is_operative(ifp)) {
for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc)) {
ifc2kaddr(ifp, ifc, &ka);
main_imsg_compose_ldpe(IMSG_NEWADDR, 0, &ka,