]> git.proxmox.com Git - mirror_frr.git/commitdiff
ldp: Fix bug configuring PW
authorßingen <bingen@voltanet.io>
Fri, 17 Nov 2017 09:32:36 +0000 (10:32 +0100)
committerßingen <bingen@voltanet.io>
Fri, 17 Nov 2017 09:48:26 +0000 (10:48 +0100)
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 <bingen@voltanet.io>
ldpd/l2vpn.c

index f9f577d564a1ffc84bf1c47bd7718a475b61b2f2..3335be08a890ae0e331cc86cdc7c219380bfb527 100644 (file)
@@ -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