At least bwfm(4) does not support WEP:

        # ifconfig bwfm0 nwkey 12345          
        ifconfig: SIOCS80211NWKEY: Operation not supported by device
        # echo $?
        0

ifconfig(8) must return non-zero in this case.

This is relevant for an upcoming installer fix, but also worth itself.

OK?

Index: ifconfig.c
===================================================================
RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v
retrieving revision 1.445
diff -u -p -r1.445 ifconfig.c
--- ifconfig.c  6 Oct 2021 06:14:08 -0000       1.445
+++ ifconfig.c  2 Nov 2021 17:20:01 -0000
@@ -2033,7 +2033,7 @@ setifnwkey(const char *val, int d)
        }
 
        if (ioctl(sock, SIOCS80211NWKEY, (caddr_t)&nwkey) == -1)
-               warn("SIOCS80211NWKEY");
+               err("SIOCS80211NWKEY");
 }
 
 /* ARGSUSED */

Reply via email to