diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-10-20 02:43:47 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-10-20 02:43:47 +0200 |
commit | 77f4dfb9b0f58a1f45856c421513be4a459365dc (patch) | |
tree | edc8cc565c26bc5f8ce64f995fd272b499cb7889 /bgpd/bgp_routemap.c | |
parent | bgpd: Prep commit to cleanup indentation (diff) | |
download | frr-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.c | 3 |
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; |