diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2017-06-30 17:19:39 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2017-08-09 12:35:16 +0200 |
commit | 87b5f1b77b4391eee99121941cf899e16835eb41 (patch) | |
tree | 1c4d0a81bef699fb7e00153883a00f65682966f7 /ldpd/lde_lib.c | |
parent | zebra: add new flag to detect nexthop label updates (diff) | |
download | frr-87b5f1b77b4391eee99121941cf899e16835eb41.tar.xz frr-87b5f1b77b4391eee99121941cf899e16835eb41.zip |
ldpd: integrate with the pseudowire manager in zebra
If we receive a notification from zebra indicating that the installation
of a pseudowire has failed (e.g. no reachability), send a PW Status
notification to the remote peer (or a Label Withdraw if the remote peer
doesn't support the PW Status TLV).
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/lde_lib.c')
-rw-r--r-- | ldpd/lde_lib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ldpd/lde_lib.c b/ldpd/lde_lib.c index edf686537..bafd33f26 100644 --- a/ldpd/lde_lib.c +++ b/ldpd/lde_lib.c @@ -531,6 +531,8 @@ lde_check_mapping(struct map *map, struct lde_nbr *ln) pw->remote_mtu = map->fec.pwid.ifmtu; if (map->flags & F_MAP_PW_STATUS) pw->remote_status = map->pw_status; + else + pw->remote_status = PW_FORWARDING; fnh->remote_label = map->label; if (l2vpn_pw_ok(pw, fnh)) lde_send_change_klabel(fn, fnh); @@ -774,6 +776,7 @@ lde_check_withdraw(struct map *map, struct lde_nbr *ln) pw = (struct l2vpn_pw *) fn->data; if (pw == NULL) continue; + pw->remote_status = PW_NOT_FORWARDING; break; default: break; @@ -802,6 +805,7 @@ lde_check_withdraw_wcard(struct map *map, struct lde_nbr *ln) struct fec_node *fn; struct fec_nh *fnh; struct lde_map *me; + struct l2vpn_pw *pw; /* LWd.2: send label release */ lde_send_labelrelease(ln, NULL, map, map->label); @@ -825,6 +829,9 @@ lde_check_withdraw_wcard(struct map *map, struct lde_nbr *ln) case FEC_TYPE_PWID: if (f->u.pwid.lsr_id.s_addr != ln->id.s_addr) continue; + pw = (struct l2vpn_pw *) fn->data; + if (pw) + pw->remote_status = PW_NOT_FORWARDING; break; default: break; |