Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jun 2023 11:36:16 +0100
From:      Alexander Chernikov <melifaro@FreeBSD.org>
To:        Benoit Chesneau <benoitc@enki-multimedia.eu>
Cc:        "freebsd-net@FreeBSD.org" <freebsd-net@freebsd.org>
Subject:   Re: can't add a /24 blackhole route with a /32 loopback
Message-ID:  <785732C7-A6B2-4039-A9E2-6AC3DCD97618@FreeBSD.org>
In-Reply-To: <WjecIjlFU9R_pRXbSj-GUxyI_O45IsDQg8tVTLo9E4BdyMUAzjSYsKtaBpewzCCv9JjWkWDkIYaW3Qm9ge3Jd10hyO-pckdRri5dWoPM7uU=@enki-multimedia.eu>
References:  <9Jh8lSg93tjEc0-UEU3MQkGuQc7R9Aht0NBt4kEr6-wtgMdf673nws_jGaHelYwz0U78ik2BM4WLUca2JZAjrX-WSbP5QS4rsvoBHZo_JZo=@enki-multimedia.eu> <4DF565CC-D8AE-4F35-A7CF-7ED5AAD27B49@FreeBSD.org> <t_gT66nRcCT4fte7HbEMcM6J2spH-rEGFNYtZqX0GsUlxW4R5_pEVx3ZqtAwphKT4UBZsGZKX9gxeym1SKdc5GmceXGy1rRYEnSU1X6-_8c=@enki-multimedia.eu> <sgx1BljfJfV-Bn0PlfJ0va7yWHE9QraHpTjPBB6jlJWq4aehFwihem8C8f3ikkjvdEGIYY15S3ppTkQpWDfR3LDi_IKewBg7XQ1v9_u3SC4=@enki-multimedia.eu> <5747CC08-6903-4E2F-B0A5-D0CAB08F8165@FreeBSD.org> <0C23EFD2-1535-46B0-9E69-93D58B376CC3@FreeBSD.org> <U2t98l4c8iB0VFmMFD9ET2Qd-xAeybUqjfNmvBPjEA5OBWiSpLdBRT9Ci6GHqryyLo8JJVnV4rMqNFvWiOKv-_6DkeVcpOTmf6c7HRAA-Qk=@enki-multimedia.eu> <WjecIjlFU9R_pRXbSj-GUxyI_O45IsDQg8tVTLo9E4BdyMUAzjSYsKtaBpewzCCv9JjWkWDkIYaW3Qm9ge3Jd10hyO-pckdRri5dWoPM7uU=@enki-multimedia.eu>

next in thread | previous in thread | raw e-mail | index | archive | help


> On 14 Jun 2023, at 11:26, Benoit Chesneau <benoitc@enki-multimedia.eu> =
wrote:
>=20
> I found an interresting log in dmesg (see below). Not sure how it can =
happens.
>=20
> Could it be related to the usage of bird?
>=20
> The log:
>=20
> ```
> [rtsock] fill_blackholeinfo: PID 72835: Unable to find ifa for =
blackhole/reject nhop
> [rtsock] fill_blackholeinfo: PID 72837: Unable to find ifa for =
blackhole/reject nhop
> [rtsock] fill_blackholeinfo: PID 72838: Unable to find ifa for =
blackhole/reject nhop
> [rtsock] fill_blackholeinfo: PID 72847: Unable to find ifa for =
blackhole/reject nhop
> [rtsock] fill_blackholeinfo: PID 72854: Unable to find ifa for =
blackhole/reject nhop
> [rtsock] fill_blackholeinfo: PID 72860: Unable to find ifa for =
blackhole/reject nhop
> ```
Not sure if that=E2=80=99s bird (it shouldn=E2=80=99t be the case), but =
that=E2=80=99s the reason.
Every route requires _some_ preferred source interface address by =
convention, as the stack wants to see some non-NULL value.
For the blackhole routes, this source address is the first address from =
lo0 interface.
In your case, `lo0` doesn=E2=80=99t contain any IPv4 addresses =
(typically there should be 127.0.0.1 there).
Is there any reason for not having 127.0.0.1 ?

>=20
>=20
> ------- Original Message -------
> On Wednesday, June 14th, 2023 at 12:18, Benoit Chesneau =
<benoitc@enki-multimedia.eu> wrote:
>=20
>=20
>>=20
>> ------- Original Message -------
>> On Wednesday, June 14th, 2023 at 11:56, Alexander Chernikov =
melifaro@FreeBSD.org wrote:
>>=20
>>> Could you try:
>>> 1) removing the 1.1.1.0/24 route
>>> 2) removing the 1.1.1.1/32 from the lo1
>>> 3) provide the output for `route -n get 1.1.1.0/24`
>>> 4) provide the output for `route -n get 1.1.1.1/32`
>>> 5) assign 1.1.1.1/32 to lo1
>>> 6) provide the output for `route -n get 1.1.1.0/24`
>>> 7) provide the output for `route -n get 1.1.1.1/32`
>>> 8) provide the output for `route add -net 1.1.1.0/24 -blackhole`
>>=20
>>=20
>> Find the result below. Such thing worked on another machine, I am not =
sure why. No obvious logs.
>>=20
>> ```
>> # route -n get 1.1.1.0/24
>> route to: 1.1.1.0
>> destination: 1.1.1.0
>> mask: 255.255.255.0
>> fib: 0
>> interface: lo1
>> flags: <UP,DONE,STATIC>
>>=20
>> recvpipe sendpipe ssthresh rtt,msec mtu weight expire
>> 0 0 0 0 16384 1 0
>> # route -n get 1.1.1.1/32
>> route to: 1.1.1.1
>> destination: 1.1.1.1
>> gateway: 10.3.1.2
>> fib: 0
>> interface: vlan212
>> flags: <UP,GATEWAY,HOST,DONE,PROTO1>
>>=20
>> recvpipe sendpipe ssthresh rtt,msec mtu weight expire
>> 0 0 0 0 9000 1 0
>> # route delete 1.1.1.0/24
>> delete net 1.1.1.0
>> # route -n get 1.1.1.1/32
>> route: route has not been found
>> # ifconfig lo1 inet 1.1.1.1/32
>> # route -n get 1.1.1.1/32
>> route to: 1.1.1.1
>> destination: 1.1.1.1
>> fib: 0
>> interface: lo1
>> flags: <UP,HOST,DONE,PINNED>
>>=20
>> recvpipe sendpipe ssthresh rtt,msec mtu weight expire
>> 0 0 0 0 16384 1 0
>> # route add -net 1.1.1.0/24 -blackhole
>> route: writing to routing socket: Operation not supported
>> add net 1.1.1.0 fib 0: Operation not supported
>> # route -n get 1.1.1.0/24
>> route: route has not been found
>> ```




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?785732C7-A6B2-4039-A9E2-6AC3DCD97618>