summaryrefslogtreecommitdiffstats
path: root/ldpd/ldp_zebra.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2016-12-12 21:28:31 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-14 19:21:08 +0100
commit88d88a9c7a8e1c6f361d154986e512d7a617c4ff (patch)
treeb902e76e09d178d34bd0b4813ba5c7c7ed755ee2 /ldpd/ldp_zebra.c
parentldpd: remove security check to allow operation on unnumbered interfaces (diff)
downloadfrr-88d88a9c7a8e1c6f361d154986e512d7a617c4ff.tar.xz
frr-88d88a9c7a8e1c6f361d154986e512d7a617c4ff.zip
zebra/ldpd: allow MPLS ECMP on unnumbered interfaces
Signed-off-by: Renato Westphal <renato@opensourcerouting.org> (cherry picked from commit 7144dc12b55e05c9ae3d784dfb75817c9f881eb6)
Diffstat (limited to 'ldpd/ldp_zebra.c')
-rw-r--r--ldpd/ldp_zebra.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/ldpd/ldp_zebra.c b/ldpd/ldp_zebra.c
index 71c0a21dd..a233cb72e 100644
--- a/ldpd/ldp_zebra.c
+++ b/ldpd/ldp_zebra.c
@@ -100,10 +100,10 @@ zebra_send_mpls_labels(int cmd, struct kroute *kr)
kr->remote_label == NO_LABEL)
return (0);
- debug_zebra_out("prefix %s/%u nexthop %s labels %s/%s (%s)",
+ debug_zebra_out("prefix %s/%u nexthop %s ifindex %u labels %s/%s (%s)",
log_addr(kr->af, &kr->prefix), kr->prefixlen,
- log_addr(kr->af, &kr->nexthop), log_label(kr->local_label),
- log_label(kr->remote_label),
+ log_addr(kr->af, &kr->nexthop), kr->ifindex,
+ log_label(kr->local_label), log_label(kr->remote_label),
(cmd == ZEBRA_MPLS_LABELS_ADD) ? "add" : "delete");
/* Reset stream. */
@@ -127,6 +127,7 @@ zebra_send_mpls_labels(int cmd, struct kroute *kr)
default:
fatalx("kr_change: unknown af");
}
+ stream_putl(s, kr->ifindex);
stream_putc(s, kr->priority);
stream_putl(s, kr->local_label);
stream_putl(s, kr->remote_label);
@@ -426,19 +427,19 @@ ldp_zebra_read_route(int command, struct zclient *zclient, zebra_size_t length,
switch (command) {
case ZEBRA_REDISTRIBUTE_IPV4_ADD:
case ZEBRA_REDISTRIBUTE_IPV6_ADD:
- debug_zebra_in("route add %s/%d nexthop %s (%s)",
- log_addr(kr.af, &kr.prefix), kr.prefixlen,
- log_addr(kr.af, &kr.nexthop),
- zebra_route_string(type));
+ debug_zebra_in("route add %s/%d nexthop %s "
+ "ifindex %u (%s)", log_addr(kr.af, &kr.prefix),
+ kr.prefixlen, log_addr(kr.af, &kr.nexthop),
+ kr.ifindex, zebra_route_string(type));
main_imsg_compose_lde(IMSG_NETWORK_ADD, 0, &kr,
sizeof(kr));
break;
case ZEBRA_REDISTRIBUTE_IPV4_DEL:
case ZEBRA_REDISTRIBUTE_IPV6_DEL:
- debug_zebra_in("route delete %s/%d nexthop %s (%s)",
- log_addr(kr.af, &kr.prefix), kr.prefixlen,
- log_addr(kr.af, &kr.nexthop),
- zebra_route_string(type));
+ debug_zebra_in("route delete %s/%d nexthop %s "
+ "ifindex %u (%s)", log_addr(kr.af, &kr.prefix),
+ kr.prefixlen, log_addr(kr.af, &kr.nexthop),
+ kr.ifindex, zebra_route_string(type));
main_imsg_compose_lde(IMSG_NETWORK_DEL, 0, &kr,
sizeof(kr));
break;