[PATCH] Netlink on FreeBSD support

Ondrej Zajicek santiago at crfreenet.org
Mon Dec 12 16:17:31 CET 2022


On Sat, Dec 10, 2022 at 04:54:52PM +0000, Alexander Chernikov wrote:
> >> In FreeBSD, the default routing table is #0 and there are no special 25X tables.
> >> Some attributes (like RTA_PREFSRC) are not supported. Interface address flags are not fully mapped yet & there might be some unsupported stuff w.r.t IPv6 prefixes lifetime.
> >> “Prohibit” nexthops are not supported yet (as the kernel only provides blackhole / reject ATM).
> >> Resilient nexthop groups are not supported yet as well.
> >> 
> >> I may be missing something, but I’m pretty sure that the implementation is close to supporting all of the current bird features (except mpls).
> >> 
> >>> Like Linux keep (and Netlink API assumes) multiple routes with different
> >>> metric, and keeps source protocol.
> >> Yes, metrics & source protocol works.
> > 
> > Does source protocol also works with the native API (krt socket)?

> No. The data is in the kernel but there are no properties in the
> protocol to propagate it. There are some spare fields in the rt_metrics
> structure that can be used for that purpose, but I’d prefer not to extend
> rtsock anymore.

> Additionally, there is no such feature in OpenBSD / NetBSD.

What about multiple routes with different metrics / priorities? Is that
supported on FreeBSD through rtsock API? That one seems to work in OpenBSD.

BTW, do you have some suggestions how to improve BIRD rtsock BSD
interface in BIRD? Especially one sore point that is collisions with
kernel provided direct routes. In recent FreeBSD, these routes seems
to be non-overwritable / non-overridable, which is safe, but causes
plenty of error messages in logs.

In recent OpenBSD, our routes are added with a different priority (RTP_*),
which is done by default, but we sometimes overwrite/remove the kernel
provided direct routes (probably because we do not use explicit priority
in add/remove operations, and remove operation defaults to removing the
kernel one, but that looks like something that could be easily fixed).

I have no idea how this works in NetBSD.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."



More information about the Bird-users mailing list