From nobody Wed Mar 13 13:09:32 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 4TvrT11TjPz5CrMn for ; Wed, 13 Mar 2024 13:09:41 +0000 (UTC) (envelope-from zlei@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 4TvrT10yggz51JT; Wed, 13 Mar 2024 13:09:41 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710335381; 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: in-reply-to:in-reply-to:references:references; bh=AG/UNEqwBGncAy7DQn7AW2+WT1F5h8YDdeX7vEJlQPo=; b=eGz+oiisYT2amLYQgJ0jLK35RmTthn8bsZ9iHEU04sUcAkoYQOiCQddZ+Q5L8oWIIWKNtC dpKSCQOXoi+G9kzo78hTg/1B5TFxN6OUwYpH6iURU/N3IVNAaD8ety5HZLhfuAu5AUCg8v qGB3hHGIXziN4hZcoDs5Lsq/rgsMj4/eLEyyjCy76CZFkNTZLnxC9HgHWUtfpcvyHGfxZ4 oaJ+SLfKsjl5IaiZDXTOPg2S2uXf4I7QyCWJYBkGMzbYOO78UIYCyTVytz/I5y5lc0OI5e PooBNYpqmiKG8EvCaexWWirWwxoJpJ/tvSKer2hKsmbfdO02zUbqqCr1YW1yEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710335381; a=rsa-sha256; cv=none; b=Y956HAdVMqQ7u5GAVxdl9I8AxF2o+/jSE6hN+UHbXVXEQTRE1T5FgLFfYkeTBaB76ZyMIt 4PaEToMzoP5J9OmlWq0UrdyzDnYv6kWNuhHnYICL689cU4Eh0BBIb9YUwKuJG0aEeyeb1K 8O+9qyxxg0osULPZSgq0U6cvVbNN4w3XzPfWIEe0kj+bUcytKG4L/elxxghzkiAwGqf7tZ w1BzcGea/XnT81Gudztk5hvJkxftVYfUUe96zboRghYueVrX4ytM1UQViWmC7v/VBscjxk lrTQZQ3hF4hf0INc4dXiUM1glkyfkQ7RuboZPK+EZpoE9MmGpgvawwMy8ws5DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710335381; 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: in-reply-to:in-reply-to:references:references; bh=AG/UNEqwBGncAy7DQn7AW2+WT1F5h8YDdeX7vEJlQPo=; b=VzzoBZIrAzLSTc1dJ+lhRV8jMZGuoELTAlhxFVymowxfHeBWEvMLmX1ejHGToQ2K2jIT4U PJkADazKOmyPkirOSlaEd/GaZ2E61g9ZoHsXXlN9O1sl6Bl8f1LfCaHFsHlUNhwcJDDpMG N5UmJvMFcmzBH5M+j2jJWUD18Cgu8Jo6bM4TA/CKHoT1URel5oRpr2n1K38/lSIccvApYi ygfMqxikxnsWqgqk1wir6P6xMcJGc7jlJhIYeq9KXA6VbrG2evKwD2QU1/Tf2k6a+7Hc94 R35nxP9R8SUf4BYG7BZNfYLTMxnoG1wgmCBBPawxWkc1zyxadu1RI/ckEdcH3A== Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TvrSz3yDlz13wh; Wed, 13 Mar 2024 13:09:39 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: <764E12BF-5D31-4905-98AE-6D745BFD1DC2@FreeBSD.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_E106DB28-5FB3-4813-8A52-A68C7ED42649" 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 \(3696.120.41.1.8\)) Subject: Re: ipv4 route with ipv6 local link nexthop ? Date: Wed, 13 Mar 2024 21:09:32 +0800 In-Reply-To: <367504DC-48DA-4DFD-9DB6-CC571F0D26B8@FreeBSD.org> Cc: "freebsd-net@FreeBSD.org" , Alexander Chernikov To: Benoit Chesneau References: <367504DC-48DA-4DFD-9DB6-CC571F0D26B8@FreeBSD.org> X-Mailer: Apple Mail (2.3696.120.41.1.8) --Apple-Mail=_E106DB28-5FB3-4813-8A52-A68C7ED42649 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 13, 2024, at 12:19 PM, Zhenlei Huang wrote: >=20 >=20 >=20 >> On Mar 13, 2024, at 4:36 AM, Benoit Chesneau = > wrote: >>=20 >> On latest freebsd 14.0 release , I am trying to join an ipv4 address = over an IPV6 local link using the following command : >>=20 >> `route add -net 10.200.1.1/32 -inet6 = fe80::9439:36ff:fef0:7cbd%vlan200` >>=20 >> But I get the following error: >>=20 >> ``` >> route add -net 10.200.1.1/32 -inet6 fe80::9439:36ff:fef0:7cbd%vlan200 >> add net 10.200.1.1: gateway fe80::9439:36ff:fef0:7cbd%vlan200 fib 0: = Invalid argument >=20 > I guess that is regression by transition of route(8) to NETLINK. >=20 > Can you please build sbin/route from source without NETLINK and give = it another try ? >=20 > ``` > # cd /usr/src/sbin/route > # setenv MK_NETLINK_SUPPORT no > # make > ``` Hi Benoit, I managed to repeat this bug. As a workaround, add an IPv4 address to the outgoing interface (vlan200 = in your case), ``` # ifconfig vlan200 inet x.x.x.x/y ``` then retry adding the route ``` # route add -net 10.200.1.1/32 -inet6 fe80::9439:36ff:fef0:7cbd%vlan200 ``` >=20 >> ``` >>=20 >> ping6 to `fe80::9439:36ff:fef0:7cbd%vlan200` works. What I am doing = wrong? Configuration of the interface is the following: >>=20 >> ``` >> vlan200: = flags=3D1008843 metric = 0 mtu 1500 >> = options=3D4600703 >> ether fe:d9:dd:2d:35:c5 >> inet6 fe80::fcd9:ddff:fe2d:35c5%vlan200 prefixlen 64 scopeid = 0x5 >> groups: vlan >> vlan: 200 vlanproto: 802.1q vlanpcp: 0 parent interface: = iavf0 >> media: Ethernet autoselect (10Gbase-SR ) >> status: active >> nd6 options=3D23> ``` >>=20 >>=20 >>=20 >> Beno=C3=AEt=20 >=20 > Best regards, > Zhenlei --Apple-Mail=_E106DB28-5FB3-4813-8A52-A68C7ED42649 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Mar 13, 2024, at 12:19 PM, Zhenlei Huang <zlei@FreeBSD.org> = wrote:



On Mar 13, 2024, at 4:36 AM, = Benoit Chesneau <benoitc@enki-multimedia.eu> wrote:

On latest = freebsd 14.0 release , I am trying to join an ipv4 address over an IPV6 = local link using the following command :

`route add -net = 10.200.1.1/32 -inet6 fe80::9439:36ff:fef0:7cbd%vlan200`

But I  get the = following error:

```
route add -net 10.200.1.1/32 -inet6 = fe80::9439:36ff:fef0:7cbd%vlan200
add net 10.200.1.1: gateway fe80::9439:36ff:fef0:7cbd%vlan200 = fib 0: Invalid argument

I guess that is = regression by transition of route(8) to = NETLINK.

Can you please build sbin/route from = source without NETLINK and give it another try ?

```
# cd = /usr/src/sbin/route
# = setenv MK_NETLINK_SUPPORT no
# make
```

Hi Benoit,

I = managed to repeat this bug.

As = a workaround, add an IPv4 address to the outgoing interface (vlan200 in = your case),
```
# ifconfig vlan200 inet = x.x.x.x/y
```

then retry = adding the route
```
# route add -net 10.200.1.1/32 = -inet6 fe80::9439:36ff:fef0:7cbd%vlan200
```


```

ping6 to `fe80::9439:36ff:fef0:7cbd%vlan200` works. = What I am doing wrong? Configuration of the interface is the = following:

```
vlan200: = flags=3D1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> = metric 0 mtu 1500
    =     = options=3D4600703<RXCSUM,TXCSUM,TSO4,TSO6,LRO,RXCSUM_IPV6,TXCSUM_IPV6,M= EXTPG>
    =     ether fe:d9:dd:2d:35:c5
        inet6 = fe80::fcd9:ddff:fe2d:35c5%vlan200 prefixlen 64 scopeid = 0x5
      =   groups: vlan
  =       vlan: 200 vlanproto: 802.1q vlanpcp: 0 parent = interface: iavf0
  =       media: Ethernet autoselect (10Gbase-SR = <full-duplex>)
  =       status: active
  =       nd6 = options=3D23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL
```



Beno=C3=AEt 

Best regards,
Zhenlei



= --Apple-Mail=_E106DB28-5FB3-4813-8A52-A68C7ED42649--