summaryrefslogtreecommitdiffstats
path: root/ldpd/ldp_zebra.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-05-01 01:16:15 +0200
committerRenato Westphal <renato@opensourcerouting.org>2017-05-01 16:33:23 +0200
commit988ded8d1258174e2b13e5f1a50ef7279ffe4b65 (patch)
treef5c4e416c9305881d6afff6c41673c104833ea5b /ldpd/ldp_zebra.c
parentMerge pull request #430 from opensourcerouting/zebra-vrfdel-fix (diff)
downloadfrr-988ded8d1258174e2b13e5f1a50ef7279ffe4b65.tar.xz
frr-988ded8d1258174e2b13e5f1a50ef7279ffe4b65.zip
ldpd: respect link-detect configuration
We shouldn't check the operational status of an interface in ldpd if it's configured with "no link-detect" in zebra. That's what all the other routing daemons do. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
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,