From nobody Thu Jul 18 15:48:22 2024 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 4WPxzq2j6Sz5Rd4k for ; Thu, 18 Jul 2024 15:48:39 +0000 (UTC) (envelope-from sm@codenetworks.net) Received: from relayout03-q01.dominioabsoluto.net (relayout03-q01.dominioabsoluto.net [217.116.26.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPxzn6BkFz4Hl2 for ; Thu, 18 Jul 2024 15:48:37 +0000 (UTC) (envelope-from sm@codenetworks.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=codenetworks.net header.s=domabs header.b=WtdE6VXN; dmarc=none; spf=pass (mx1.freebsd.org: domain of sm@codenetworks.net designates 217.116.26.243 as permitted sender) smtp.mailfrom=sm@codenetworks.net Received: from relayout03-redir.dominioabsoluto.net (relayout03-redir.dominioabsoluto.net [217.116.26.247]) by relayout03.dominioabsoluto.net (Postfix) with ESMTP id 4WPxzj29SSz1xs0 for ; Thu, 18 Jul 2024 17:48:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codenetworks.net; s=domabs; t=1721317713; bh=zDyIFpEzAJ/HeOBvXpGxSQjAyju1+oPdSF9UXLfV824=; h=From:Subject:Date:References:In-Reply-To:To:From; b=WtdE6VXNPz5/3YUDd1Z7ri6KZorOxZCwIs0x/id7xnI5he71MDcEkzpD+Gc567VwW wglSR6g9jRAJKJpJGo+DGUFQQ4oQRdeORO+f+HD16OsFFtd2QLe1tCJO0OHB0r2zH6 bDTA4b2ov3K8ak8nOKjM2U2RkmdqVfLd7H2RT7QI= Received: from smtpclient.apple (unknown [188.241.98.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: sm.codenetworks.net) by relayout03-dsp.dominioabsoluto.net (Postfix) with ESMTPSA id 4WPxzh6XkRz1xs0 for ; Thu, 18 Jul 2024 17:48:32 +0200 (CEST) Content-Type: multipart/alternative; boundary=Apple-Mail-2F3EF50F-171F-4DA5-8688-F58A1AB937F5 Content-Transfer-Encoding: 7bit From: Santiago Martinez 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 (1.0) Subject: Re: Multiple Fibs and INET6 Date: Thu, 18 Jul 2024 17:48:22 +0200 Message-Id: References: In-Reply-To: To: freebsd-net@freebsd.org X-Mailer: iPhone Mail (21F90) X-PostalOut-Country: IP: 188.241.98.123 | Country: ES X-PostalOut-Information: AntiSPAM and AntiVIRUS on relayout03 X-PostalOut-MsgID: 4WPxzh6XkRz1xs0.AE241 X-PostalOut-SpamCheck: no es spam, clean X-PostalOut-From: sm@codenetworks.net X-PostalOut-Watermark: 1721922513.15001@jbprNJrfWyTKoSgsgZBQPg X-Spam-Status: No X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.79 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.992]; R_SPF_ALLOW(-0.20)[+ip4:217.116.26.0/24]; RCVD_IN_DNSWL_LOW(-0.20)[217.116.26.243:from,217.116.26.247:received]; R_DKIM_ALLOW(-0.20)[codenetworks.net:s=domabs]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RWL_MAILSPIKE_GOOD(-0.10)[217.116.26.243:from]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[codenetworks.net:+]; DMARC_NA(0.00)[codenetworks.net]; RCPT_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:16371, ipnet:217.116.24.0/21, country:ES]; ARC_NA(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; APPLE_IOS_MAILER_COMMON(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~] X-Rspamd-Queue-Id: 4WPxzn6BkFz4Hl2 --Apple-Mail-2F3EF50F-171F-4DA5-8688-F58A1AB937F5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi everyone, Did anyone had the chance to take a look? For me it=E2=80=99s a bug but before filling the PR want to know what=E2=80=99= s your view or if it=E2=80=99s a limitation or bug by design. Br Santi > On 12 Jul 2024, at 19:06, Santiago Martinez wrote: >=20 > =EF=BB=BF > Hi Everyone. >=20 > While adding -F ( fib as used in netstat ) to ping and ping6 I have found s= omething that from my understanding is not correct. > Please can you advise? > I have the following setup : >=20 > -- two fibs (0 and 1)=20 > -- two loop-backs (lo0 and lo1). > -- Lo1 has been assigned to fib1 > -- net.add_addr_allfibs =3D 0 > My interface output looks like this: >=20 > ifconfig lo0 | grep inet6 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 >=20 > ifconfig lo1 | grep inet6 > inet6 fe80::1%lo1 prefixlen 64 scopeid 0x3 >=20 >=20 > If I do a netstat -rn -6 -F0 I get the following which is was i expected.= >=20 > Internet6: > Destination Gateway Flags N= etif Expire > ::/96 link#2 URS = lo0 > ::1 link#2 UHS = lo0 > ::ffff:0.0.0.0/96 link#2 URS = lo0 > fe80::%lo0/10 link#2 URS = lo0 > fe80::%lo0/64 link#2 U = lo0 > fe80::1%lo0 link#2 UHS = lo0 > ff02::/16 link#2 URS = lo0 >=20 >=20 > Now, netstat -rn -6 -F1 shows "fe80::1%lo0" which should not be there a= nd "fe80::1%lo1" is missing which should be there. > Internet6: > Destination Gateway Flags N= etif Expire > fe80::%lo1/64 link#3 U = lo1 > fe80::1%lo0 link#2 UHS = lo0 >=20 >=20 > What output I was expecting was: > Internet6: > Destination Gateway Flags N= etif Expire > fe80::%lo1/64 link#3 U = lo1 > fe80::1%lo1 link#3 UHS = lo1 >=20 >=20 >=20 > This makes the ping -6 -F0 fe80::1%lo0 to work but ping -6 -F1 fe80::1%l0= 1 to fail which I wanted to use as test case. >=20 > Thanks in advance. >=20 > Santiago >=20 --Apple-Mail-2F3EF50F-171F-4DA5-8688-F58A1AB937F5 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi e= veryone,
Did anyone had the chance to take a look?
For me it=E2=80=99s a bug but before filling the PR want t= o know what=E2=80=99s your view or if it=E2=80=99s a limitation or bug by de= sign.
Br
Santi


On 12 Jul 2024= , at 19:06, Santiago Martinez <sm@codenetworks.net> wrote:

=EF=BB=BF =20 =20 =20

Hi Everyone.

While adding -F ( fib as used in netstat ) to ping and ping6 I have found something that from my understanding is not correct.
Please can you advise?

I have the following setup :

-- two fibs (0 and 1) 
-- two  loop-backs (lo0 and lo1).
-- Lo1 has been assigned to fib1
-- net.add_addr_allfibs =3D 0

My interface output looks like this:

ifconfig lo0 | grep inet6
       inet6 ::1 prefixlen 128
       inet6 fe80::1%lo0 prefixle= n 64 scopeid 0x2

ifconfig lo1 | grep inet6
       inet6 fe80::1%lo1 prefixle= n 64 scopeid 0x3

If I do a netstat -rn -6  -F0 I get the following which is was i= expected.

Internet6:
Destination          &n= bsp;            = Gateway            &n= bsp;          Flags  =    Netif Expire
::/96           &n= bsp;            =      link#2            &n= bsp;           URS &n= bsp;       lo0
::1           &nbs= p;            &n= bsp;      link#2            &n= bsp;           UHS &n= bsp;       lo0
::ffff:0.0.0.0/96         &n= bsp;       link#2            &n= bsp;           URS &n= bsp;       lo0
fe80::%lo0/10          =            link#2            &n= bsp;           URS &n= bsp;       lo0
fe80::%lo0/64          =            link#2            &n= bsp;           U &nbs= p;         lo0
fe80::1%lo0          &n= bsp;            = link#2            &n= bsp;           UHS &n= bsp;       lo0
ff02::/16          &nbs= p;            &n= bsp; link#2            &n= bsp;           URS &n= bsp;       lo0

Now,  netstat -rn -6  -F1 shows  "fe80::1%lo0" which shou= ld not be there and "fe80::1%lo1" is missing which should be there.

Internet6:
Destination          &n= bsp;            = Gateway            &n= bsp;          Flags  =    Netif Expire
fe80::%lo1/64          =            link#3            &n= bsp;           U &nbs= p;         lo1
fe80::1%lo0          = ;            &nb= sp;link#2            =             UHS &= nbsp;       lo0

What output I was expecting was:

Internet6:
Destination          &n= bsp;            = Gateway            &n= bsp;          Flags  =    Netif Expire
fe80::%lo1/64          =            link#3            &n= bsp;           U &nbs= p;         lo1
fe80::1%lo1          = ;             li= nk#3            =             UHS  = ;       lo1


This makes the ping -6 -F0 fe80::1%lo0  to work but ping -6 -F1 fe80::1%l01 to fail which I wanted to use as test case.

Thanks in advance.

Santiago


=20
= --Apple-Mail-2F3EF50F-171F-4DA5-8688-F58A1AB937F5--