On Thu, Oct 22, 2020 at 04:16:36PM +0200, Vincent Bernat wrote: > With net.ipv4.conf.XXX.ignore_routes_with_linkdown sysctl, a user can > ensure the kernel does not use a route whose target interface is down. > The route is marked with a "dead"/RTNH_F_DEAD flag. Currently, BIRD > still uses and distributes this route. This patch just ignores such a > route.
Hi (Noticed while looking for some missed / forgotten e-mails) Thanks, merged with some changes (handling of direct and multipath routes): https://gitlab.nic.cz/labs/bird/-/commit/df83f626973fda1e67769d295c47d4d246e4c1c4 Although it would make sense to handle dead routes as withdraws instead of just ingore them (for async notification), it does not matter for sync scan, and as i noticed during testing, Linux kernel does not send async notifications (when the flag changes to dead) anyways, so it does not really matter. > This patch could be backported to 1.6.x. > > Signed-off-by: Vincent Bernat <[email protected]> > --- > sysdep/linux/netlink.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c > index f85bcf35685b..c28126510e6e 100644 > --- a/sysdep/linux/netlink.c > +++ b/sysdep/linux/netlink.c > @@ -1690,6 +1690,9 @@ nl_parse_route(struct nl_parse_state *s, struct > nlmsghdr *h) > if (i->rtm_flags & RTNH_F_ONLINK) > ra->nh.flags |= RNF_ONLINK; > > + if (i->rtm_flags & RTNH_F_DEAD) > + return; > + > neighbor *nbr; > nbr = neigh_find(&p->p, ra->nh.gw, ra->nh.iface, > (ra->nh.flags & RNF_ONLINK) ? NEF_ONLINK : 0); > -- > 2.28.0 -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: [email protected]) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
signature.asc
Description: PGP signature
