• Bug#1109252: "Netlink: invalid argument" when adding blackhole or unrea

    From Pete Heist@21:1/5 to All on Mon Jul 14 10:00:01 2025
    Package: bird2
    Version: 2.17.1-1

    When installing blackhole or unreachable IPv6 routes using a static
    protocol, a message appears in the logs "Netlink: invalid argument" and
    the route is not installed.

    BIRD config:

    protocol static blackhole6 {
    ipv6 {
    };
    route 2001:db8::/32 blackhole; # Documentation/test range
    }

    Partial log:

    Jul 14 09:25:28 debian13 systemd[1]: Started bird.service - BIRD
    Internet Routing Daemon.
    Jul 14 09:25:28 debian13 bird[1252]: Started
    Jul 14 09:25:28 debian13 bird[1252]: Netlink: Invalid argument

    If I remove the route, the message goes away. I also see this with the
    bird3 package version 3.1.0-1, and with a compiled version of BIRD
    3.1.2, so it could be something different with the kernel?

    root@debian13:# uname -a
    Linux debian13 6.12.35+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian
    6.12.35-1 (2025-07-03) x86_64 GNU/Linux

    I do NOT see this on BIRD 2 or BIRD 3 on Debian 12.

    I found this in the BIRD FAQ: https://gitlab.nic.cz/labs/bird/-/wikis/FAQ#ipv6-blackhole-and-prohibit-routes-do-not-work-on-linux

    I think this applies to older kernels though, because using
    "unreachable" instead of "blackhole" doesn't fix it, and although I can
    instead use "via dummy0" with a dummy device present and make the error
    go away:

    protocol static blackhole6 {
    ipv6 {
    };
    route 2001:db8::/32 via "dummy0"; # Documentation/test range
    }

    the route is then not installed in the kernel according to "ip -6
    route". Something doesn't seem to be right...

    Thanks!

    Pete Heist

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pete Heist@21:1/5 to All on Mon Jul 14 16:20:01 2025
    One important thing to add to this is that I installed a Debian 12 VM
    with the bird2 package version 2.0.12-7 and was able to reproduce it
    with that as well.

    The reason I said I wasn't seeing this on D12 was that I do not see it
    in a Debian 12 *LXD container*, but that is running on Ubuntu 24.04.2
    with kernel 6.8.0-63-generic, so it's not really the same.

    This behavior is something that's been around for a longer time then. I
    will send an update if I figure out more.

    Pete

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pete Heist@21:1/5 to All on Mon Jul 14 17:00:01 2025
    Ok, I found the real reason for this.

    I was setting the krt_prefsrc attribute on all routes exported to the
    kernel (to set the preferred source address), but when this is done on
    an unreachable or blackhole route, the kernel rejects it with an error.
    I have to *not* set krt_prefsrc for these routes.

    This bug can be closed, and sorry for any wasted time!

    Pete

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)