summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_routemap.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-10-20 02:43:47 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-10-20 02:43:47 +0200
commit77f4dfb9b0f58a1f45856c421513be4a459365dc (patch)
treeedc8cc565c26bc5f8ce64f995fd272b499cb7889 /bgpd/bgp_routemap.c
parentbgpd: Prep commit to cleanup indentation (diff)
downloadfrr-77f4dfb9b0f58a1f45856c421513be4a459365dc.tar.xz
frr-77f4dfb9b0f58a1f45856c421513be4a459365dc.zip
bgpd: Dissallow v6 routes from setting a v4 nexthop
Do not allow a v6 route to set a v4 nexthop via a routemap. As that this will crash bgp. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r--bgpd/bgp_routemap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 1b2c1306f..ca0291d0a 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -1406,6 +1406,9 @@ static route_map_result_t route_set_ip_nexthop(void *rule,
if (type != RMAP_BGP)
return RMAP_OKAY;
+ if (prefix->family == AF_INET6)
+ return RMAP_OKAY;
+
path = object;
peer = path->peer;