diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-11-29 16:22:08 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-11-29 20:39:19 -0200 |
| commit | 3c5b5220f72fea3a3d0f47b7ca7cc282bd5dc1ce (patch) | |
| tree | ec9ff019cf6ca7030c6268369d6ec7414f32ea6a /ldpd/lde.c | |
| parent | 69df82f3b5d3aa343c769f280fb811ce019601d4 (diff) | |
zebra, ldpd: fix display of pseudowire status
In some circumstances zebra and ldpd would display a pseudowire as UP
when in reality it's not (example: MTU mismatch between the two ends). Fix
this to avoid confusion.
Reported-by: ßingen <bingen@voltanet.io>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/lde.c')
| -rw-r--r-- | ldpd/lde.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ldpd/lde.c b/ldpd/lde.c index b597d967d7..63e1e39946 100644 --- a/ldpd/lde.c +++ b/ldpd/lde.c @@ -767,11 +767,12 @@ lde_send_change_klabel(struct fec_node *fn, struct fec_nh *fnh) sizeof(kr)); break; case FEC_TYPE_PWID: - if (fn->local_label == NO_LABEL || + pw = (struct l2vpn_pw *) fn->data; + if (!pw || fn->local_label == NO_LABEL || fnh->remote_label == NO_LABEL) return; - pw = (struct l2vpn_pw *) fn->data; + pw->enabled = true; pw2zpw(pw, &zpw); zpw.local_label = fn->local_label; zpw.remote_label = fnh->remote_label; @@ -818,6 +819,10 @@ lde_send_delete_klabel(struct fec_node *fn, struct fec_nh *fnh) break; case FEC_TYPE_PWID: pw = (struct l2vpn_pw *) fn->data; + if (!pw) + return; + + pw->enabled = false; pw2zpw(pw, &zpw); zpw.local_label = fn->local_label; zpw.remote_label = fnh->remote_label; |
