]> git.proxmox.com Git - mirror_frr.git/commitdiff
ldpd: fix bug in pseudowire control-word negotiation
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 2 Jun 2017 14:14:54 +0000 (11:14 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Mon, 5 Jun 2017 15:24:36 +0000 (12:24 -0300)
Bingen discovered a bug in the pseudowire control-word negotiation that
might happen when the "control-word exclude" command is used. Under some
very specific conditions, ldpd might ignore a PWID label mapping when
it shouldn't.

This patch removes a wrong optimization that was preventing ldpd to call
l2vpn_pw_reset() every time we change the configuration of a pseudowire.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ldpd/ldpd.c

index bdf70973234559c47c333fd8c479e2d0c9219b4a..f9e44012efd8e88636cc9abc2cefed88ae870329 100644 (file)
@@ -1679,8 +1679,7 @@ merge_l2vpn(struct ldpd_conf *xconf, struct l2vpn *l2vpn, struct l2vpn *xl)
                                        session_shutdown(nbr, S_SHUTDOWN, 0, 0);
                        }
                }
-               if (ldpd_process == PROC_LDE_ENGINE &&
-                   !reset_nbr && reinstall_pwfec)
+               if (ldpd_process == PROC_LDE_ENGINE && reinstall_pwfec)
                        l2vpn_pw_exit(pw);
                pw->lsr_id = xp->lsr_id;
                pw->af = xp->af;
@@ -1702,8 +1701,7 @@ merge_l2vpn(struct ldpd_conf *xconf, struct l2vpn *l2vpn, struct l2vpn *xl)
                        pw->flags &= ~F_PW_STATIC_NBR_ADDR;
                if (ldpd_process == PROC_LDP_ENGINE && reinstall_tnbr)
                        ldpe_l2vpn_pw_init(pw);
-               if (ldpd_process == PROC_LDE_ENGINE &&
-                   !reset_nbr && reinstall_pwfec) {
+               if (ldpd_process == PROC_LDE_ENGINE && reinstall_pwfec) {
                        l2vpn->pw_type = xl->pw_type;
                        l2vpn->mtu = xl->mtu;
                        l2vpn_pw_init(pw);