diff options
author | Karen Schoener <karen@volta.io> | 2020-07-13 18:22:15 +0200 |
---|---|---|
committer | Karen Schoener <karen@volta.io> | 2020-07-20 15:08:15 +0200 |
commit | 4272a06426b44674259d5b96cd7d5bfd80c11439 (patch) | |
tree | 0c8281facc20771b1703c728ca914f2bf582b596 /ldpd/l2vpn.c | |
parent | Merge pull request #6767 from donaldsharp/compile_issues (diff) | |
download | frr-4272a06426b44674259d5b96cd7d5bfd80c11439.tar.xz frr-4272a06426b44674259d5b96cd7d5bfd80c11439.zip |
ldpd: process pw-status in received order
Update LDP to process received pw-status in received order.
Update LDP to save pw-status regardless of whether the PW is configured.
When the PW is configured, LDP checks for any saved PW pw-status.
Signed-off-by: Karen Schoener <karen@voltanet.io>
Diffstat (limited to 'ldpd/l2vpn.c')
-rw-r--r-- | ldpd/l2vpn.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ldpd/l2vpn.c b/ldpd/l2vpn.c index 0d479e77b..2c68f3edb 100644 --- a/ldpd/l2vpn.c +++ b/ldpd/l2vpn.c @@ -294,6 +294,16 @@ l2vpn_pw_reset(struct l2vpn_pw *pw) pw->flags |= F_PW_STATUSTLV; else pw->flags &= ~F_PW_STATUSTLV; + + if (pw->flags & F_PW_STATUSTLV_CONF) { + struct fec_node *fn; + struct fec fec; + l2vpn_pw_fec(pw, &fec); + fn = (struct fec_node *)fec_find(&ft, &fec); + if (fn) + pw->remote_status = fn->pw_remote_status; + } + } int @@ -433,6 +443,8 @@ l2vpn_recv_pw_status(struct lde_nbr *ln, struct notify_msg *nm) /* unknown fec */ return; + fn->pw_remote_status = nm->pw_status; + pw = (struct l2vpn_pw *) fn->data; if (pw == NULL) return; |