summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-03-29 00:23:27 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-04-18 00:40:17 +0200
commitcafec8da4f0a7ac850eb42a71c6d695e1f79fc7c (patch)
treed0ba8d9565fda572ac1e76b879380559e138b09e /lib
parentMerge pull request #2064 from donaldsharp/redistribute_limitation (diff)
downloadfrr-cafec8da4f0a7ac850eb42a71c6d695e1f79fc7c.tar.xz
frr-cafec8da4f0a7ac850eb42a71c6d695e1f79fc7c.zip
lib, pbrd: Do not allow v6 LL nexthops to be specified without an interface.
Prevent the creation of a v6 LL nexthop that does not include an interface for proper resolution. Ticket: CM-20276 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/nexthop_group.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c
index 1ec49c2a0..a527d011a 100644
--- a/lib/nexthop_group.c
+++ b/lib/nexthop_group.c
@@ -280,8 +280,14 @@ DEFPY(ecmp_nexthops, ecmp_nexthops_cmd,
intf, vrf->name);
return CMD_WARNING;
}
- } else
+ } else {
+ if (IN6_IS_ADDR_LINKLOCAL(&nhop.gate.ipv6)) {
+ vty_out(vty,
+ "Specified a v6 LL with no interface, rejecting\n");
+ return CMD_WARNING_CONFIG_FAILED;
+ }
nhop.type = NEXTHOP_TYPE_IPV6;
+ }
}
nh = nexthop_exists(&nhgc->nhg, &nhop);