Date: Wed, 07 Jun 2023 21:49:03 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 271895] route(8) shows Invalid argument on an i386 jail when setting the default route Message-ID: <bug-271895-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271895 Bug ID: 271895 Summary: route(8) shows Invalid argument on an i386 jail when setting the default route Product: Base System Version: 13.2-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: DtxdF@disroot.org Description: When setting the default route on an i386 jail `route(8)` displays the error `Invalid argument` on an amd64 host. `route(8)` on an amd64 jail will work = as expected. Steps to reproduce this issue: ``` # pwd /var/jail/jtest # wget -O components/i386-13.2-RELEASE-base.txz https://download.freebsd.org/releases/i386/13.2-RELEASE/base.txz --2023-06-07 17:32:22--=20 https://download.freebsd.org/releases/i386/13.2-RELEASE/base.txz Resolving download.freebsd.org (download.freebsd.org)... 96.47.72.116, 2610:1c1:1:606c::15:0 Connecting to download.freebsd.org (download.freebsd.org)|96.47.72.116|:443= ... connected. HTTP request sent, awaiting response... 200 OK Length: 187400420 (179M) [application/octet-stream] Saving to: =E2=80=98components/i386-13.2-RELEASE-base.txz=E2=80=99 components/i386-13.2-RELEASE-base.txz=20=20=20=20 100%[=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D>] 178.72M 512KB/s in 4m 55s 2023-06-07 17:37:17 (621 KB/s) - =E2=80=98components/i386-13.2-RELEASE-base= .txz=E2=80=99 saved [187400420/187400420] # tar -C root -xpf components/i386-13.2-RELEASE-base.txz # jail -cf jail.conf jtest: created ELF ldconfig path: /lib /usr/lib /usr/lib/compat /etc/rc: WARNING: $hostname is not set -- see rc.conf(5). Starting Network: lo0 em0. lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=3D680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL> em0: flags=3D8862<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D481249b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LRO,WOL= _MAGIC,VLAN_HWFILTER,NOMAP> ether xx:xx:xx:xx:xx:xx media: Ethernet autoselect (100baseTX <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> route: writing to routing socket: Invalid argument add host 127.0.0.1: gateway lo0 fib 0: Invalid argument route: writing to routing socket: Invalid argument add host ::1: gateway lo0 fib 0: Invalid argument add net fe80::: gateway ::1 fib 0: route already in table add net ff02::: gateway ::1 fib 0: route already in table add net ::ffff:0.0.0.0: gateway ::1 fib 0: route already in table add net ::0.0.0.0: gateway ::1 fib 0: route already in table Clearing /tmp (X related). Creating and/or trimming log files. Updating motd:. Updating /var/run/os-release done. Starting syslogd. Starting sendmail_submit. Starting sendmail_msp_queue. Starting cron. Wed Jun 7 21:38:46 UTC 2023 # jexec -l jtest ifconfig em0 inet 192.168.1.146/24 root@dtxdf-test:/var/jail/jtest # jexec -l jtest ifconfig em0 em0: flags=3D8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D481249b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LRO,WOL= _MAGIC,VLAN_HWFILTER,NOMAP> ether xx:xx:xx:xx:xx:xx inet 192.168.1.146 netmask 0xffffff00 broadcast 192.168.1.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> root@dtxdf-test:/var/jail/jtest # jexec -l jtest ping -c4 192.168.1.1 PING 192.168.1.1 (192.168.1.1): 56 data bytes 64 bytes from 192.168.1.1: icmp_seq=3D0 ttl=3D64 time=3D0.756 ms 64 bytes from 192.168.1.1: icmp_seq=3D1 ttl=3D64 time=3D0.348 ms 64 bytes from 192.168.1.1: icmp_seq=3D2 ttl=3D64 time=3D0.404 ms 64 bytes from 192.168.1.1: icmp_seq=3D3 ttl=3D64 time=3D0.435 ms --- 192.168.1.1 ping statistics --- 4 packets transmitted, 4 packets received, 0.0% packet loss round-trip min/avg/max/stddev =3D 0.348/0.486/0.756/0.159 ms # jexec -l jtest netstat -4rn Routing tables (0) (0) UH 6968 (0) (0) U (0) (0) UHS 6968 # jexec -l jtest route add default 192.168.1.1 route: writing to routing socket: Invalid argument add net default: gateway 192.168.1.1 fib 0: Invalid argument ``` Jail configuration: ``` # cat /var/jail/jtest/jail.conf jtest { path =3D "/var/jail/${name}/root"; exec.start =3D "/bin/sh /etc/rc"; exec.stop =3D "/bin/sh /etc/rc.shutdown jail"; vnet; vnet.interface =3D em0; mount.devfs; } # jls -sj jtest devfs_ruleset=3D0 enforce_statfs=3D2 host=3Dnew ip4=3Dinherit ip6=3Dinherit= jid=3D12 name=3Djtest osreldate=3D1302001 osrelease=3D13.2-RELEASE path=3D/var/jail/= jtest/root nopersist securelevel=3D-1 sysvmsg=3Ddisable sysvsem=3Ddisable sysvshm=3Ddi= sable vnet=3Dnew zfs=3Dnew allow.nochflags allow.nomlock allow.nomount allow.mount.nodevfs allow.mount.nofdescfs allow.mount.nonullfs allow.mount.noprocfs allow.mount.notmpfs allow.mount.nozfs allow.noquotas allow.noraw_sockets allow.noread_msgbuf allow.reserved_ports allow.set_host= name allow.nosocket_af allow.suser allow.nosysvipc allow.unprivileged_proc_debug children.max=3D0 host.domainname=3D"" host.hostid=3D0 host.hostname=3D"" host.hostuuid=3D00000000-0000-0000-0000-000000000000 zfs.mount_snapshot=3D0 ``` Host information: ``` # uname -a FreeBSD dtxdf-test 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC amd64 ``` --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271895-227>