On 08/04/2020 06.52, Martin Pieuchot wrote:
It's the same bug as reported by sthen@. Two interfaces in the same subnet
have two identical cloning routes:
I've been able to reproduce systematically the problem with an OpenBSD
virtual machine running the latest snapshot and two vio interface with
different priority connected to the same lan with dhcp.
Simply running "dhclient vio1" where vio1 is the interface with the
lowest priority will reproduce the problem.
On the virtualization host:
=====
lad$ cat vm.conf
switch "uplink" {
interface bridge0
}
vm test {
disk /home/lsalle/vmd/test-root.qcow2
interface { switch "uplink" }
interface { switch "uplink" }
owner lsalle
}
lad$
=====
On the "test" host:
=====
test# cat /etc/rc.conf.local
syslogd_flags="-Z"
test# cat /etc/rc.local
#!/bin/sh
route -n monitor -inet|logger -t routemon &
test# cat /etc/hostname.vio
hostname.vio0 hostname.vio1
test# cat /etc/hostname.vio0
dhcp
test# cat /etc/hostname.vio1
priority 5
dhcp
test# date; ifconfig; netstat -nrfinet; arp -a; ping -c 1 8.8.8.8; date
Thu Apr 9 20:06:35 UTC 2020
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
index 4 priority 0 llprio 3
groups: lo
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet 127.0.0.1 netmask 0xff000000
vio0:
flags=808b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST,AUTOCONF4>
mtu 1500
lladdr fe:e1:bb:d1:20:1f
index 1 priority 0 llprio 3
groups: egress
media: Ethernet autoselect
status: active
inet 192.168.1.11 netmask 0xffffff00 broadcast 192.168.1.255
vio1:
flags=808b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST,AUTOCONF4>
mtu 1500
lladdr fe:e1:bb:d2:e3:24
index 2 priority 5 llprio 3
groups: egress
media: Ethernet autoselect
status: active
inet 192.168.1.22 netmask 0xffffff00 broadcast 192.168.1.255
enc0: flags=0<>
index 3 priority 0 llprio 3
groups: enc
status: active
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33136
index 5 priority 0 llprio 3
groups: pflog
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Prio
Iface
default 192.168.1.254 UGS 5 7 - 8
vio0
default 192.168.1.254 UGS 0 0 - 13
vio1
224/4 127.0.0.1 URS 0 8 32768 8
lo0
127/8 127.0.0.1 UGRS 0 0 32768 8
lo0
127.0.0.1 127.0.0.1 UHhl 1 2 32768 1
lo0
192.168.1/24 192.168.1.11 UCn 1 1 - 4
vio0
192.168.1/24 192.168.1.22 UCn 1 0 - 9
vio1
192.168.1.11 fe:e1:bb:d1:20:1f UHLl 0 3 - 1
vio0
192.168.1.22 fe:e1:bb:d2:e3:24 UHLl 0 3 - 1
vio1
192.168.1.254 f4:ca:e5:55:0d:2d UHLch 1 10 - 3
vio0
192.168.1.254 link#2 UHLch 1 0 - 8
vio1
192.168.1.255 192.168.1.11 UHPb 0 0 - 1
vio0
192.168.1.255 192.168.1.22 UHPb 0 0 - 1
vio1
Host Ethernet Address Netif Expire
Flags
192.168.1.11 fe:e1:bb:d1:20:1f vio0 permanent l
192.168.1.22 fe:e1:bb:d2:e3:24 vio1 permanent l
192.168.1.254 f4:ca:e5:55:0d:2d vio0 18m18s
192.168.1.254 (incomplete) vio1 expired
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=54 time=16.354 ms
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 16.354/16.354/16.354/0.000 ms
Thu Apr 9 20:06:35 UTC 2020
test# dhclient -v vio1
vio1: DHCPREQUEST to 255.255.255.255
vio1: DHCPACK from 192.168.1.254 (f4:ca:e5:55:0d:2d)
vio1: 192.168.1.22 lease accepted from 192.168.1.254 (f4:ca:e5:55:0d:2d)
test# date; ifconfig; netstat -nrfinet; arp -a; ping -c 1 8.8.8.8; date
Thu Apr 9 20:08:13 UTC 2020
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
index 4 priority 0 llprio 3
groups: lo
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet 127.0.0.1 netmask 0xff000000
vio0:
flags=808b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST,AUTOCONF4>
mtu 1500
lladdr fe:e1:bb:d1:20:1f
index 1 priority 0 llprio 3
groups: egress
media: Ethernet autoselect
status: active
inet 192.168.1.11 netmask 0xffffff00 broadcast 192.168.1.255
vio1:
flags=808b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST,AUTOCONF4>
mtu 1500
lladdr fe:e1:bb:d2:e3:24
index 2 priority 5 llprio 3
groups: egress
media: Ethernet autoselect
status: active
inet 192.168.1.22 netmask 0xffffff00 broadcast 192.168.1.255
enc0: flags=0<>
index 3 priority 0 llprio 3
groups: enc
status: active
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33136
index 5 priority 0 llprio 3
groups: pflog
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Prio
Iface
default 192.168.1.254 UGS 5 13 - 8
vio0
default 192.168.1.254 UGS 0 0 - 13
vio1
224/4 127.0.0.1 URS 0 12 32768 8
lo0
127/8 127.0.0.1 UGRS 0 0 32768 8
lo0
127.0.0.1 127.0.0.1 UHhl 1 2 32768 1
lo0
192.168.1/24 192.168.1.11 UCn 0 1 - 4
vio0
192.168.1/24 192.168.1.22 UCn 1 0 - 9
vio1
192.168.1.11 fe:e1:bb:d1:20:1f UHLl 0 5 - 1
vio0
192.168.1.22 fe:e1:bb:d2:e3:24 UHLl 0 4 - 1
vio1
192.168.1.254 link#2 UHLch 1 0 - 8
vio1
192.168.1.255 192.168.1.11 UHPb 0 0 - 1
vio0
192.168.1.255 192.168.1.22 UHPb 0 0 - 1
vio1
Host Ethernet Address Netif Expire
Flags
192.168.1.11 fe:e1:bb:d1:20:1f vio0 permanent l
192.168.1.22 fe:e1:bb:d2:e3:24 vio1 permanent l
192.168.1.254 (incomplete) vio1 expired
PING 8.8.8.8 (8.8.8.8): 56 data bytes
ping: sendmsg: Invalid argument
ping: wrote 8.8.8.8 64 chars, ret=-1
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 0 packets received, 100.0% packet loss
Thu Apr 9 20:08:35 UTC 2020
test# tail -100 /var/log/messages
2020-04-09T20:04:47.028Z test /bsd: virtio1: irq 5
2020-04-09T20:04:47.029Z test /bsd: virtio2 at pci0 dev 3 function 0
"Qumranet Virtio Network" rev 0x00
2020-04-09T20:04:47.029Z test /bsd: vio1 at virtio2: address
fe:e1:bb:d2:e3:24
2020-04-09T20:04:47.029Z test /bsd: virtio2: irq 6
2020-04-09T20:04:47.029Z test /bsd: virtio3 at pci0 dev 4 function 0
"Qumranet Virtio Storage" rev 0x00
2020-04-09T20:04:47.030Z test /bsd: vioblk0 at virtio3
2020-04-09T20:04:47.030Z test /bsd: scsibus1 at vioblk0: 2 targets
2020-04-09T20:04:47.030Z test /bsd: sd0 at scsibus1 targ 0 lun 0:
<VirtIO, Block Device, >
2020-04-09T20:04:47.031Z test /bsd: sd0: 51200MB, 512 bytes/sector,
104857600 sectors
2020-04-09T20:04:47.031Z test /bsd: virtio3: irq 7
2020-04-09T20:04:47.031Z test /bsd: virtio4 at pci0 dev 5 function 0
"OpenBSD VMM Control" rev 0x00
2020-04-09T20:04:47.031Z test /bsd: vmmci0 at virtio4
2020-04-09T20:04:47.032Z test /bsd: virtio4: irq 9
2020-04-09T20:04:47.032Z test /bsd: isa0 at mainbus0
2020-04-09T20:04:47.032Z test /bsd: isadma0 at isa0
2020-04-09T20:04:47.033Z test /bsd: com0 at isa0 port 0x3f8/8 irq 4:
ns8250, no fifo
2020-04-09T20:04:47.033Z test /bsd: com0: console
2020-04-09T20:04:47.033Z test /bsd: vscsi0 at root
2020-04-09T20:04:47.033Z test /bsd: scsibus2 at vscsi0: 256 targets
2020-04-09T20:04:47.034Z test /bsd: softraid0 at root
2020-04-09T20:04:47.034Z test /bsd: scsibus3 at softraid0: 256 targets
2020-04-09T20:04:47.034Z test /bsd: root on sd0a (68a1a230563c857f.a)
swap on sd0b dump on sd0b
2020-04-09T20:04:47.139Z test sendsyslog: dropped 3 messages, error 57,
pid 75775
2020-04-09T20:04:47.897Z test savecore: no core dump
2020-04-09T20:05:08.413Z test reorder_kernel: kernel relinking done
2020-04-09T20:08:04.786Z test routemon: got message of size 96 on Thu
Apr 9 20:08:04 2020
2020-04-09T20:08:04.798Z test routemon: RTM_PROPOSAL: config proposal:
len 96, source dhcp, table 0, if# 2, name vio1, pid: 36095, seq
1206118299, errno 0
2020-04-09T20:08:04.802Z test routemon: flags:<UP,DONE,PROTO3>
2020-04-09T20:08:04.803Z test routemon: fmask:
2020-04-09T20:08:04.803Z test routemon: use: 0 mtu: 0
expire: 0
2020-04-09T20:08:04.804Z test routemon: locks: inits:
2020-04-09T20:08:04.804Z test dhclient[14405]: vio1 [priv]: add route
0.0.0.0/0.0.0.0 via 192.168.1.254: File exists
2020-04-09T20:08:04.804Z test routemon: got message of size 232 on Thu
Apr 9 20:08:04 2020
2020-04-09T20:08:04.804Z test routemon: RTM_PROPOSAL: config proposal:
len 232, source dhcp, table 0, if# 2, name vio1, pid: 14405, seq
1077550051, errno 0
2020-04-09T20:08:04.805Z test routemon: flags:<UP,DONE>
2020-04-09T20:08:04.805Z test routemon: fmask:
2020-04-09T20:08:04.805Z test routemon: use: 0 mtu: 0
expire: 0
2020-04-09T20:08:04.805Z test routemon: locks: inits:
2020-04-09T20:08:04.805Z test routemon: proposals: <DNS>
2020-04-09T20:08:04.805Z test routemon: [192.168.1.254]
2020-04-09T20:08:04.805Z test routemon: got message of size 192 on Thu
Apr 9 20:08:04 2020
2020-04-09T20:08:04.805Z test routemon: RTM_DELETE: Delete Route: len
192, priority 3, table 0, if# 1, name vio0, pid: 0, seq 0, errno 0
2020-04-09T20:08:04.805Z test routemon: flags:<HOST,DONE,CLONED,CACHED>
2020-04-09T20:08:04.805Z test routemon: fmask:
2020-04-09T20:08:04.805Z test routemon: use: 0 mtu: 0
expire: 0
2020-04-09T20:08:04.805Z test routemon: locks: inits:
2020-04-09T20:08:04.805Z test routemon: sockaddrs: <DST,GATEWAY,IFP,IFA>
2020-04-09T20:08:04.805Z test routemon: 192.168.1.254 f4:ca:e5:55:0d:2d
fe:e1:bb:d1:20:1f 192.168.1.11
2020-04-09T20:08:04.805Z test routemon: got message of size 288 on Thu
Apr 9 20:08:04 2020
2020-04-09T20:08:04.805Z test routemon: RTM_MISS: Lookup failed on this
address: len 288, priority 0, table 0, if# 0, pid: 0, seq 0, errno 17
2020-04-09T20:08:04.805Z test routemon: flags:<DONE>
2020-04-09T20:08:04.805Z test routemon: fmask:
2020-04-09T20:08:04.805Z test routemon: use: 0 mtu: 0
expire: 0
2020-04-09T20:08:04.805Z test routemon: locks: inits:
2020-04-09T20:08:04.806Z test routemon: sockaddrs: <DST,GATEWAY>
2020-04-09T20:08:04.806Z test routemon: 192.168.1.254 (117)
Q74.0e.00.80.ff.ff.f0.a3.44.81.ff.ff.ff.ff.00.00.00.00.00.00.00.00.07.00.00.00.00.00.00.00.70.46.99.1d.80.fd.ff.ff.80.d9.02.00.60.00.00.00.00.00.00.00.00.00.00.00.48.76.74.0e.00.80.ff.ff.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.11
2020-04-09T20:08:04.806Z test routemon: got message of size 160 on Thu
Apr 9 20:08:04 2020
2020-04-09T20:08:04.806Z test routemon: RTM_ADD: Add Route: len 160,
priority 0, table 0, if# 2, name vio1, pid: 14405, seq 0, errno 17
2020-04-09T20:08:04.806Z test routemon: flags:<GATEWAY,STATIC>
2020-04-09T20:08:04.806Z test routemon: fmask:
2020-04-09T20:08:04.806Z test routemon: use: 0 mtu: 0
expire: 0
2020-04-09T20:08:04.806Z test routemon: locks: inits:
2020-04-09T20:08:04.806Z test routemon: sockaddrs: <DST,GATEWAY,NETMASK,IFA>
2020-04-09T20:08:04.806Z test routemon: 0.0.0.0 192.168.1.254 0.0.0.0
192.168.1.22
2020-04-09T20:08:04.806Z test routemon: got message of size 192 on Thu
Apr 9 20:08:04 2020
2020-04-09T20:08:04.806Z test routemon: RTM_GET: Report Metrics: len
192, priority 8, table 0, if# 1, name vio0, pid: 14405, seq 1669944781,
errno 0
2020-04-09T20:08:04.806Z test routemon: flags:<UP,GATEWAY,DONE,STATIC>
2020-04-09T20:08:04.806Z test routemon: fmask:
2020-04-09T20:08:04.806Z test routemon: use: 8 mtu: 0
expire: 0
2020-04-09T20:08:04.806Z test routemon: locks: inits:
2020-04-09T20:08:04.806Z test routemon: sockaddrs:
<DST,GATEWAY,NETMASK,IFP,IFA>
2020-04-09T20:08:04.806Z test routemon: 0.0.0.0 192.168.1.254 0.0.0.0
fe:e1:bb:d1:20:1f 192.168.1.11
2020-04-09T20:08:04.806Z test routemon: got message of size 192 on Thu
Apr 9 20:08:04 2020
2020-04-09T20:08:04.806Z test routemon: RTM_GET: Report Metrics: len
192, priority 8, table 0, if# 1, name vio0, pid: 14405, seq 2121307706,
errno 0
2020-04-09T20:08:04.806Z test routemon: flags:<UP,GATEWAY,DONE,STATIC>
2020-04-09T20:08:04.806Z test routemon: fmask:
2020-04-09T20:08:04.806Z test routemon: use: 8 mtu: 0
expire: 0
2020-04-09T20:08:04.806Z test routemon: locks: inits:
2020-04-09T20:08:04.806Z test routemon: sockaddrs:
<DST,GATEWAY,NETMASK,IFP,IFA>
2020-04-09T20:08:04.806Z test routemon: 0.0.0.0 192.168.1.254 0.0.0.0
fe:e1:bb:d1:20:1f 192.168.1.11
2020-04-09T20:08:05.742Z test ntpd[53935]: sendto: Invalid argument
2020-04-09T20:08:05.742Z test last message repeated 2 times
2020-04-09T20:08:05.838Z test /bsd: arpresolve: 192.168.1.254: route
contains no arp information
2020-04-09T20:08:05.838Z test last message repeated 2 times
2020-04-09T20:08:09.758Z test ntpd[53935]: sendto: Invalid argument
2020-04-09T20:08:09.758Z test ntpd[53935]: sendto: Invalid argument
2020-04-09T20:08:09.838Z test /bsd: arpresolve: 192.168.1.254: route
contains no arp information
2020-04-09T20:08:09.838Z test /bsd: arpresolve: 192.168.1.254: route
contains no arp information
2020-04-09T20:08:13.096Z test routemon: got message of size 192 on Thu
Apr 9 20:08:13 2020
2020-04-09T20:08:13.096Z test routemon: RTM_RESOLVE: Route created by
cloning: len 192, priority 8, table 0, if# 2, name vio1, pid: 0, seq 0,
errno 0
2020-04-09T20:08:13.096Z test routemon:
flags:<UP,HOST,DONE,LLINFO,CLONED,CACHED>
2020-04-09T20:08:13.096Z test routemon: fmask:
2020-04-09T20:08:13.096Z test routemon: use: 0 mtu: 0
expire: 0
2020-04-09T20:08:13.096Z test routemon: locks: inits:
2020-04-09T20:08:13.097Z test routemon: sockaddrs: <DST,GATEWAY,IFP,IFA>
2020-04-09T20:08:13.097Z test routemon: 192.168.1.254 f4:ca:e5:55:0d:2d
fe:e1:bb:d2:e3:24 192.168.1.22
2020-04-09T20:08:13.142Z test /bsd: arpresolve: 192.168.1.254: route
contains no arp information
2020-04-09T20:09:09.699Z test ntpd[53935]: sendto: Invalid argument
2020-04-09T20:09:09.699Z test last message repeated 4 times
2020-04-09T20:09:09.718Z test /bsd: arpresolve: 192.168.1.254: route
contains no arp information
test# dmesg
OpenBSD 6.7-beta (GENERIC) #113: Wed Apr 8 23:58:21 MDT 2020
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 520085504 (495MB)
avail mem = 491868160 (469MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf3f40 (10 entries)
bios0: vendor SeaBIOS version "1.11.0p2-OpenBSD-vmm" date 01/01/2011
bios0: OpenBSD VMM
acpi at bios0 not configured
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1993.49 MHz, 06-8e-0a
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,CX8,SEP,PGE,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,PCLMUL,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,RDSEED,ADX,SMAP,CLFLUSHOPT,MD_CLEAR,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
cpu0: using VERW MDS workaround
pvbus0 at mainbus0: OpenBSD
pvclock0 at pvbus0
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "OpenBSD VMM Host" rev 0x00
virtio0 at pci0 dev 1 function 0 "Qumranet Virtio RNG" rev 0x00
viornd0 at virtio0
virtio0: irq 3
virtio1 at pci0 dev 2 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio1: address fe:e1:bb:d1:20:1f
virtio1: irq 5
virtio2 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00
vio1 at virtio2: address fe:e1:bb:d2:e3:24
virtio2: irq 6
virtio3 at pci0 dev 4 function 0 "Qumranet Virtio Storage" rev 0x00
vioblk0 at virtio3
scsibus1 at vioblk0: 2 targets
sd0 at scsibus1 targ 0 lun 0: <VirtIO, Block Device, >
sd0: 51200MB, 512 bytes/sector, 104857600 sectors
virtio3: irq 7
virtio4 at pci0 dev 5 function 0 "OpenBSD VMM Control" rev 0x00
vmmci0 at virtio4
virtio4: irq 9
isa0 at mainbus0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns8250, no fifo
com0: console
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (68a1a230563c857f.a) swap on sd0b dump on sd0b
arpresolve: 192.168.1.254: route contains no arp information
arpresolve: 192.168.1.254: route contains no arp information
arpresolve: 192.168.1.254: route contains no arp information
arpresolve: 192.168.1.254: route contains no arp information
arpresolve: 192.168.1.254: route contains no arp information
arpresolve: 192.168.1.254: route contains no arp information
arpresolve: 192.168.1.254: route contains no arp information
arpresolve: 192.168.1.254: route contains no arp information
arpresolve: 192.168.1.254: route contains no arp information
arpresolve: 192.168.1.254: route contains no arp information
arpresolve: 192.168.1.254: route contains no arp information
test#
======