Weird behavior of link local gateway assignments
Ondrej Zajicek
santiago at crfreenet.org
Mon Mar 15 16:43:19 CET 2021
On Mon, Mar 15, 2021 at 06:56:24AM +0100, Marcel Krüger wrote:
> Hi,
>
> I encountered some issues when trying to set the gateway to a link-local
> IPv6 address in a filter and am wondering if there is a trick I am
> missing:
>
> When assigning a link-local address (say fe80::4242%eno1)
> to `gw` in a filter using e.g.
>
> gw = fe80::4242%eno1;
>
> the config file parser complains about a unexpected "%". Of course, it
> doesn't work without the `%eno1` either ("Invalid gw address"), so is
> there other way to pass the intended interface?
Hi
Unfortunately this does not work and i do not see any workarounds in
existing code. Our IP address data type does not keep 'iface' in it, so
link-local IPv6 addresses are a bit of problem. Also, setting gw
(regular) in reality sets both gw and iface for a nexthop (gw is
resolved and appropriate iface is found).
It makes sense to add workaround for link-local addresses so that setting
link-local gw is resolved in existing iface, so at least things like:
ifname = "eno1";
gw = fe80::4242;
or
gw = gw;
would work.
--
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