From nobody Wed Jun 14 10:36:16 2023 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qh20D650jz4djSB for ; Wed, 14 Jun 2023 10:36:28 +0000 (UTC) (envelope-from melifaro@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qh20D2ylKz4J46; Wed, 14 Jun 2023 10:36:28 +0000 (UTC) (envelope-from melifaro@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686738988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q27eMZHRH7CSJyIv9ePKK/PKsGltiHPOGEKr5/uLTXU=; b=EXnTpiVHGzPfCTougU0aQFOGWTgCB1yASgtrjkitYw3EP7Dk4blqj1mv03vx+b3ZOSdRME MArqkfd8z4ztbjUcfFwGUVUcQJBJYXHywesPTFvqvCRyyVSmh15n0DsVxcXYGP1At4FCJJ W27qi3I8JnupKvkyQ4os5XAmETFj788rx7up2n6RQtdx3gYB1NEHoBPPEVJyaIXTqdpZqv alRXzeEQRFoxb+ColnN/lpnKEcHyu2VhpDRPr83C86ADNKPH1wbYOZBx6xV7IEa4ywxLuf Rr/hGEDVxOK5eveE2tjlDHrc7VNu7/3AsL7jh77Rpzy2YRWhtX4EjT09+DX1PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686738988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q27eMZHRH7CSJyIv9ePKK/PKsGltiHPOGEKr5/uLTXU=; b=Wcyias1+4NEfwBc7Xggb3MVTiNT5geyeJKv8P9uEyOxWpYHM+e2n6spxe0xNlbmIG7kHhh 37z1MPSHTi029nS9d5aQFE8wilkBgmtHeKKdhgQyzYGi7lnaZ0C33s0XDomJCvBexf4y2B AUww3kLz+UHs76FoZ2ySbR13vFzvrrINwfX0SbwPQjBq/pJOHOA/+SHda6J7niwTcSg+JV X+vGJHAcIPJIQ+5o8SejNMo4CJuTtdp1pBVNNYiV6AomYCIRP8izLotBOn+dnUaouNVdwX XWzvvYwrXd3ffQdSWeOk1MQ5zRc0BVOfUTXcQZGT7H6JP8Ib3OVuiOmkciEcsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686738988; a=rsa-sha256; cv=none; b=qs/ofp4H7vNIJoqhXS5iAyVdh0L4XvhKobxKjhqHtUur6PNe1Lx+H56KcFWEtad5dBUt8i 6BdQ4n0ucU2sdCR1UaI1HwAfg4Qk/GfQxsp/DyHA920dEHuok46DdtFGX8OC6rj/LTpN+x UJ9Amhhuh6P86u/4ApsU/vx6ULYEPhFRK8W6JBqF4MgwvHynLEwzRsgRxbS2t60fMCfdr/ 7OvsiPmzb1NBV7PFvdeZlV/ZyRwQpQcLt5AVzLR3Nesa1J7C+vnZ0FHdgw768eJA+xsa9P r8unO0If9opwJaA8ocKV51rc2lTuxBk4O0kvwi2nWPC622tHKdFYekS7LZ2o4g== Received: from smtpclient.apple (unknown [IPv6:2a02:8084:d6bb:510:c042:b45f:635f:2eb0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: melifaro/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Qh20C6mT6zJrW; Wed, 14 Jun 2023 10:36:27 +0000 (UTC) (envelope-from melifaro@freebsd.org) Content-Type: text/plain; charset=utf-8 List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: can't add a /24 blackhole route with a /32 loopback From: Alexander Chernikov In-Reply-To: Date: Wed, 14 Jun 2023 11:36:16 +0100 Cc: "freebsd-net@FreeBSD.org" Content-Transfer-Encoding: quoted-printable Message-Id: <785732C7-A6B2-4039-A9E2-6AC3DCD97618@FreeBSD.org> References: <9Jh8lSg93tjEc0-UEU3MQkGuQc7R9Aht0NBt4kEr6-wtgMdf673nws_jGaHelYwz0U78ik2BM4WLUca2JZAjrX-WSbP5QS4rsvoBHZo_JZo=@enki-multimedia.eu> <4DF565CC-D8AE-4F35-A7CF-7ED5AAD27B49@FreeBSD.org> <5747CC08-6903-4E2F-B0A5-D0CAB08F8165@FreeBSD.org> <0C23EFD2-1535-46B0-9E69-93D58B376CC3@FreeBSD.org> To: Benoit Chesneau X-Mailer: Apple Mail (2.3731.600.7) X-ThisMailContainsUnwantedMimeParts: N > On 14 Jun 2023, at 11:26, Benoit Chesneau = 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 = 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: >>=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: >>=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: >>=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 >> ```