summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorßingen <bingen@voltanet.io>2017-11-17 10:32:36 +0100
committerßingen <bingen@voltanet.io>2017-11-17 10:45:12 +0100
commit9d5d2358ac4b1d46858273dfb3724bb66ca8d3ac (patch)
treedc1c64b63aaffa3a713e5d2e282ae54ffbf35b86
parent75ff304ab02be1e9c62a0e89067812666db0c2fc (diff)
ldp: Fix bug configuring PW
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>
-rw-r--r--ldpd/l2vpn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ldpd/l2vpn.c b/ldpd/l2vpn.c
index afb9528d80..9bb378a11c 100644
--- a/ldpd/l2vpn.c
+++ b/ldpd/l2vpn.c
@@ -238,13 +238,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