]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_updgrp_adv.c
bgpd: withdraw default route when route-map has no match
authorAlexander Chernavin <achernavin@netgate.com>
Tue, 25 Aug 2020 11:10:47 +0000 (07:10 -0400)
committerAlexander Chernavin <achernavin@netgate.com>
Tue, 25 Aug 2020 11:24:13 +0000 (07:24 -0400)
commitf52a961ac888cc627f7e4161fcc5f0b7af7026e6
tree40b8e563e0390df81b3bc3d36cc6b202ab6cfd3f
parent310451ba9712f2d4483bd976a968cd4b6d19477f
bgpd: withdraw default route when route-map has no match

If you advertise a default route (via default-originate) only if some
prefix is present in the BGP RIB (route-map specified) and this prefix
becomes unavailable, the default route keeps being advertised.

With this change, when we iterate over the BGP RIB to check if we can
advertise the default route, skip unavailable prefixes.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
bgpd/bgp_updgrp_adv.c