summaryrefslogtreecommitdiffstats
path: root/ldpd/ldp_zebra.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-05-01 20:17:14 +0200
committerGitHub <noreply@github.com>2017-05-01 20:17:14 +0200
commitcae31a9fe06d6df7799b2687f64e90f0757856cb (patch)
tree5c835ff7af1b5e4253add067276dcef190e0eca0 /ldpd/ldp_zebra.c
parentMerge pull request #406 from chiragshah6/pim_dev_3_0 (diff)
parentldpd: respect link-detect configuration (diff)
downloadfrr-cae31a9fe06d6df7799b2687f64e90f0757856cb.tar.xz
frr-cae31a9fe06d6df7799b2687f64e90f0757856cb.zip
Merge pull request #432 from opensourcerouting/ldpd-link-detect
ldpd: respect link-detect configuration
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 702b5c5ea..f1fefaaea 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);
}
@@ -257,7 +257,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
@@ -272,8 +271,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,