Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: -current cloner interfaces broken/gone/unusable



On 23/04/2018 23:34, Robert Swindells wrote:

Frank Kardel <kardel%netbsd.org@localhost> wrote:
using -current as of 20180421 (NetBSD 8.99.14 (GENERIC) #0: Sat Apr 21
23:01:29 UTC 2018
mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64)

no cloning interfaces are visible:

gateway# ifconfig -l
ixg0 ixg1 ixg2 ixg3 lo0 tun0 tun1
gateway# ifconfig -C
ifconfig: SIOCIFGCLONERS for count: Device not configured
gateway# ifconfig vlan0 create
ifconfig: clone_command: Device not configured
ifconfig: exec_matches: Device not configured
gateway#

This does not seem to be a desirable state - any clues what broke here ?

It looks to be the test for a valid interface name in
sys/compat/common/uipc_syscalls_50.c that is causing this, I think it
should only be done when the ioctl command is SIOCGIFDATA or SIOCZIFDATA.

This works for me but is a bit ugly:

Index: uipc_syscalls_50.c
===================================================================
RCS file: /cvsroot/src/sys/compat/common/uipc_syscalls_50.c,v
retrieving revision 1.4
diff -u -r1.4 uipc_syscalls_50.c
--- uipc_syscalls_50.c  12 Apr 2018 18:50:13 -0000      1.4
+++ uipc_syscalls_50.c  23 Apr 2018 22:33:14 -0000
@@ -63,9 +63,17 @@
         struct ifnet *ifp;
         int error;
- ifp = ifunit(ifdr->ifdr_name);
-       if (ifp == NULL)
-               return ENXIO;
+       switch (cmd) {
+       case SIOCGIFDATA:
+       case SIOCZIFDATA:
+               ifp = ifunit(ifdr->ifdr_name);
+               if (ifp == NULL)
+                       return ENXIO;
+               break;
+       default:
+               ifp = NULL;
+               break;
+       }
switch (cmd) {
         case SIOCGIFDATA:


Committed, thanks

Roy


Home | Main Index | Thread Index | Old Index