From 77f4dfb9b0f58a1f45856c421513be4a459365dc Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 19 Oct 2018 20:43:47 -0400 Subject: [PATCH] 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 --- bgpd/bgp_routemap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 1b2c1306f7..ca0291d0a1 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; -- 2.39.5