summaryrefslogtreecommitdiffstats
path: root/ripngd/ripng_routemap.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-06-11 18:19:59 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-06-11 18:19:59 +0200
commitbf8b3d27623615c3b2a82d9f4867c70c8071a9be (patch)
treed30097084516d017567b6acd7d310fe9f4636986 /ripngd/ripng_routemap.c
parentUpdate the log message when we receive a non-link-local nexthop for better (diff)
downloadfrr-bf8b3d27623615c3b2a82d9f4867c70c8071a9be.tar.xz
frr-bf8b3d27623615c3b2a82d9f4867c70c8071a9be.zip
When a route-map configuration is used to set the nexthop to a value, make
sure that the value is acceptable. For example, if the route-map is setting the IPv6 link-local nexthop, make sure the value is an IPv6 link-local address.
Diffstat (limited to 'ripngd/ripng_routemap.c')
-rw-r--r--ripngd/ripng_routemap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c
index eae4566a6..9bda2e260 100644
--- a/ripngd/ripng_routemap.c
+++ b/ripngd/ripng_routemap.c
@@ -645,6 +645,12 @@ DEFUN (set_ipv6_nexthop_local,
return CMD_WARNING;
}
+ if (!IN6_IS_ADDR_LINKLOCAL(&su.sin6.sin6_addr))
+ {
+ vty_out (vty, "%% Invalid link-local nexthop address%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
return ripng_route_set_add (vty, vty->index, "ipv6 next-hop local", argv[0]);
}