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:~%