Mike Belopuhov(m...@belopuhov.com) on 2017.01.13 13:28:01 +0100: > On Fri, Jan 13, 2017 at 13:15 +0100, Mike Belopuhov wrote: > > On 13 January 2017 at 13:11, Sebastian Benoit <be...@openbsd.org> wrote: > > > On current, there seem to be two problems with lo(4) interfaces: > > > > > > 1. "ifconfig lo6 up" fails > > > > > > # ifconfig lo6 create > > > # ifconfig lo6 up > > > ifconfig: SIOCSIFFLAGS: Inappropriate ioctl for device > > > # ifconfig lo6 destroy > > > # > > > > > > The sys/net/rdomains regress test fails because of this, and i think > > > sys/net/if.c rev 1.473 might be the cause. > > > > > > It still works on a kernel from early December. > > > > > > 2. "ifconfig lo6 destroy" fails on an interface in an rdomain > > > > > > # ifconfig lo6 create > > > # ifconfig lo6 rdomain 6 > > > # ifconfig lo6 > > > lo6: flags=8008<LOOPBACK,MULTICAST> rdomain 6 mtu 32768 > > > index 12 priority 0 llprio 3 > > > groups: lo > > > # ifconfig lo6 destroy > > > ifconfig: SIOCIFDESTROY: Operation not permitted > > > > > > This has been broken a bit longer, it still works in 6.0. > > > > > > > it's not broken, we have introduced automagic loopback interface > > creation when you create an rdomain. this means you have to do > > "ifconfig lo6 create rdomain 6". > > However, I've just found a subtle bug here: destroying a loopback > interface corresponding to a newly created rdomain will fail, while > destroying loopback interfaces created in the same rdomain afterwards > will work. Observe: > > kemushi:~% sudo ifconfig lo9 create rdomain 9 > kemushi:~% sudo ifconfig lo9 > lo9: flags=8008<LOOPBACK,MULTICAST> rdomain 9 mtu 32768 > index 13 priority 0 llprio 3 > groups: lo > kemushi:~% sudo ifconfig lo9 destroy > ifconfig: SIOCIFDESTROY: Operation not permitted > kemushi:~% sudo ifconfig lo9 rdomain 0 > kemushi:~% sudo ifconfig lo9 destroy > > Now we create lo9 again in the same rdomain: > > kemushi:~% sudo ifconfig lo9 > lo9: no such interface > kemushi:~% sudo ifconfig lo9 create rdomain 9 > kemushi:~% sudo ifconfig lo9 > lo9: flags=8008<LOOPBACK,MULTICAST> rdomain 9 mtu 32768 > index 14 priority 0 llprio 3 > groups: lo > kemushi:~% sudo ifconfig lo9 destroy > kemushi:~%
Here is another "thing": # ifconfig lo15 rdomain 15 up # ifconfig lo15 lo15: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> rdomain 15 mtu 32768 index 18 priority 0 llprio 3 groups: lo inet6 ::1 prefixlen 128 inet6 fe80::1%lo15 prefixlen 64 scopeid 0x12 -> the interface gets the ::1 address # ifconfig lo15 rdomain 0 # ifconfig lo15 destroy # ifconfig lo15 rdomain 15 up # ifconfig lo15 lo15: flags=8009<UP,LOOPBACK,MULTICAST> rdomain 15 mtu 32768 index 19 priority 0 llprio 3 groups: lo -> the interface does not get the ::1 address The difference is, that in the second case, the (empty) rtable 15 still exists, as it is not deleted when the interface is moved to rdomain 0. # ifconfig lo15 destroy # route -T 15 show Routing tables #