Re: [BIRD 2.0.x] Netlink: ignore dead routes

2022-01-08 Thread Ondrej Zajicek
On Sat, Jan 01, 2022 at 08:10:01PM +0100, Alexander Zubkov wrote: > I made a patch for that. It works at least for my test case. I had to > add additional parameter to nl_parse_multipath() function to pass > information about this exception for dead routes. But may be there are > better ways to do

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2022-01-01 Thread Alexander Zubkov
I made a patch for that. It works at least for my test case. I had to add additional parameter to nl_parse_multipath() function to pass information about this exception for dead routes. But may be there are better ways to do that. For example to set "s->krt_src" earlier, but I do not know if it

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2021-12-27 Thread Ondrej Zajicek
On Mon, Dec 27, 2021 at 02:51:34PM +0100, Alexander Zubkov wrote: > Hi all, > > I'll pop up this old discussion. I've found a bug with bird handling > its routes when ignore_routes_with_linkdown is enabled. And I suspect > it is related to this patch. > The problem is that bird does not replace

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2021-12-27 Thread Alexander Zubkov
Hi all, I'll pop up this old discussion. I've found a bug with bird handling its routes when ignore_routes_with_linkdown is enabled. And I suspect it is related to this patch. The problem is that bird does not replace or delete the routes it installed when they are marked as dead. For example if

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2021-01-15 Thread Ondrej Zajicek
On Fri, Jan 15, 2021 at 12:01:47PM +0100, Vincent Bernat wrote: > I was also confused by the debug code in iface.c: > > if (i->flags & IF_ADMIN_UP) > debug(" LINK-UP"); > > I think it should be ADMIN-UP and the if for IF_LINK_UP should be added. Yes. this seems like a remnant from the

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2021-01-15 Thread Vincent Bernat
❦ 15 janvier 2021 05:39 +01, Ondrej Zajicek: >> It is more complex that I would have expected. First, in-kernel, the >> next-hop only has RTNH_F_LINKDOWN, not RTNH_F_DEAD. This later flag is >> added when sending the flags over netlink only. >> >> Second, there is no async notification when a

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2021-01-14 Thread Ondrej Zajicek
On Thu, Jan 14, 2021 at 07:46:04PM +0100, Vincent Bernat wrote: > It is more complex that I would have expected. First, in-kernel, the > next-hop only has RTNH_F_LINKDOWN, not RTNH_F_DEAD. This later flag is > added when sending the flags over netlink only. > > Second, there is no async

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2021-01-14 Thread Vincent Bernat
❦ 14 janvier 2021 08:23 +01, Vincent Bernat: >> 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

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2021-01-13 Thread Vincent Bernat
❦ 14 janvier 2021 04:18 +01, Ondrej Zajicek: > 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

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2021-01-13 Thread Ondrej Zajicek
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

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2020-10-26 Thread Ondrej Zajicek
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

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2020-10-23 Thread Vincent Bernat
❦ 23 octobre 2020 16:17 +02, Bernd Naumann: > So the issue unfoldes if I get routes via ${hop} and I'm supposed to > reach ${hop} on an interface (using its device route for example) but > the device is down? So bird will happily exports these routes to the > kernel, but the kernel is never

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2020-10-23 Thread Bernd Naumann
On 23.10.20 11:36, Vincent Bernat wrote: ❦ 23 octobre 2020 08:48 +02, Bernd Naumann: I have a question: What is then `check link` supposed to do? At least for 1.6, babel is the only protocol which enables it by default, and the others, for in example direct, static, and ospf it is needed to

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2020-10-23 Thread Vincent Bernat
❦ 23 octobre 2020 08:48 +02, Bernd Naumann: > I have a question: > What is then `check link` supposed to do? > > At least for 1.6, babel is the only protocol which enables it by > default, and the others, for in example direct, static, and ospf it is > needed to be set by the user, and I would

Re: [BIRD 2.0.x] Netlink: ignore dead routes

2020-10-23 Thread Bernd Naumann
I have a question: What is then `check link` supposed to do? At least for 1.6, babel is the only protocol which enables it by default, and the others, for in example direct, static, and ospf it is needed to be set by the user, and I would have assumed exactly that behavior. Or is this

[BIRD 2.0.x] Netlink: ignore dead routes

2020-10-22 Thread Vincent Bernat
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. This patch