From 6e8cb22638cf0c7ebc8f5cc4a13eca671e03742b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=9Fingen?= Date: Fri, 17 Nov 2017 10:32:36 +0100 Subject: [PATCH] ldp: Fix bug configuring PW MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit With non-targeted LDP receiving a PW label mapping before configuring the PW was causing the SET message to be sent before the ADD one, so Zebra PW manager wouldn't find the PW on first message reception. Signed-off-by: ßingen --- ldpd/l2vpn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ldpd/l2vpn.c b/ldpd/l2vpn.c index f9f577d564..3335be08a8 100644 --- a/ldpd/l2vpn.c +++ b/ldpd/l2vpn.c @@ -239,13 +239,13 @@ l2vpn_pw_init(struct l2vpn_pw *pw) l2vpn_pw_reset(pw); + pw2zpw(pw, &zpw); + lde_imsg_compose_parent(IMSG_KPW_ADD, 0, &zpw, sizeof(zpw)); + l2vpn_pw_fec(pw, &fec); lde_kernel_insert(&fec, AF_INET, (union ldpd_addr*)&pw->lsr_id, 0, 0, 0, (void *)pw); lde_kernel_update(&fec); - - pw2zpw(pw, &zpw); - lde_imsg_compose_parent(IMSG_KPW_ADD, 0, &zpw, sizeof(zpw)); } void -- 2.39.5