diff options
Diffstat (limited to 'zebra/zebra_pw.c')
| -rw-r--r-- | zebra/zebra_pw.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/zebra/zebra_pw.c b/zebra/zebra_pw.c index bbd01a759e..68ad69397f 100644 --- a/zebra/zebra_pw.c +++ b/zebra/zebra_pw.c @@ -256,7 +256,7 @@ static int zebra_pw_check_reachability(struct zebra_pw *pw) * Need to ensure that there's a label binding for all nexthops. * Otherwise, ECMP for this route could render the pseudowire unusable. */ - for (ALL_NEXTHOPS(re->nexthop, nexthop)) { + for (ALL_NEXTHOPS(re->ng, nexthop)) { if (!nexthop->nh_label) { if (IS_ZEBRA_DEBUG_PW) zlog_warn("%s: unlabeled route for %s", @@ -294,8 +294,11 @@ void zebra_pw_exit(struct zebra_vrf *zvrf) { struct zebra_pw *pw; - while ((pw = RB_ROOT(zebra_pw_head, &zvrf->pseudowires)) != NULL) + while (!RB_EMPTY(zebra_pw_head, &zvrf->pseudowires)) { + pw = RB_ROOT(zebra_pw_head, &zvrf->pseudowires); + zebra_pw_del(zvrf, pw); + } } DEFUN_NOSH (pseudowire_if, |
