Skip to content

Commit

Permalink
bgpd: Dissallow v6 routes from setting a v4 nexthop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
donaldsharp committed Oct 20, 2018
1 parent 2b67b6f commit 77f4dfb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bgpd/bgp_routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 77f4dfb

Please sign in to comment.