summaryrefslogtreecommitdiff
path: root/ldpd/interface.c
diff options
context:
space:
mode:
authorMitesh Kanjariya <mitesh@cumulusnetworks.com>2018-02-27 01:46:26 -0800
committerGitHub <noreply@github.com>2018-02-27 01:46:26 -0800
commit23e386ac714b48872d7d41ad118b12ebbc22984c (patch)
tree295c1033f46f99eaacf014dde0b42beb035f1e71 /ldpd/interface.c
parent6fb219da876ace4732e31005466cae708e512d42 (diff)
parentac3133a35d340a765be1518c2669b979e39fbe66 (diff)
Merge branch 'master' into type5-default-originate
Diffstat (limited to 'ldpd/interface.c')
-rw-r--r--ldpd/interface.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ldpd/interface.c b/ldpd/interface.c
index bbcea9f553..b25be43a5c 100644
--- a/ldpd/interface.c
+++ b/ldpd/interface.c
@@ -306,8 +306,11 @@ if_reset(struct iface *iface, int af)
ia = iface_af_get(iface, af);
if_stop_hello_timer(ia);
- while ((adj = RB_ROOT(ia_adj_head, &ia->adj_tree)) != NULL)
+ while (!RB_EMPTY(ia_adj_head, &ia->adj_tree)) {
+ adj = RB_ROOT(ia_adj_head, &ia->adj_tree);
+
adj_del(adj, S_SHUTDOWN);
+ }
/* try to cleanup */
switch (af) {