Return non-zero on failed "nwkey" command
authorkn <kn@openbsd.org>
Tue, 2 Nov 2021 23:36:43 +0000 (23:36 +0000)
committerkn <kn@openbsd.org>
Tue, 2 Nov 2021 23:36:43 +0000 (23:36 +0000)
commitccd2b0c096acc68ae6f70e0561c6c95cfcaf37d1
tree143fdaabca6aea822ed23ff8fd4c02549c5a0b08
parent0057cee774ad438f8712c4fb8f503de140b5c7c6
Return non-zero on failed "nwkey" command

Fail early and exit non-zero immediately instead of indicating success and
possibly carrying the next ifconfig command.

Found at install when wifi interfaces are reset with "-nwid -nwkey -wpa":

Which network interface do you wish to configure? (or 'done') [bse0] bwfm0
ifconfig: SIOCS80211NWKEY: Operation not supported by device
Access point? (ESSID, 'any', list# or '?') [any] 2
Security protocol? (O)pen, (W)EP, WPA-(P)SK [O]

bwfm(4) currently does not support WEP.

OK stsp
sbin/ifconfig/ifconfig.c