diff options
author | Peter Hessler <phessler@cvs.openbsd.org> | 2019-01-19 21:06:03 +0000 |
---|---|---|
committer | Peter Hessler <phessler@cvs.openbsd.org> | 2019-01-19 21:06:03 +0000 |
commit | fcba18051dd8ef5c79f9af51162ce69870443890 (patch) | |
tree | 0efcc64d38fda772d091afc399889c6450bc8025 /sbin | |
parent | 4f43b9659d5ac3e6a27940436d4969aa628e2245 (diff) |
properly error out instead of only printing a warning when some join commands
failed
OK deraadt@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index b7149ddf980..62749d6f5ad 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.389 2019/01/18 20:25:35 phessler Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.390 2019/01/19 21:06:02 phessler Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -1752,7 +1752,7 @@ process_join_commands(void) ifr.ifr_data = (caddr_t)&join; if (ioctl(s, SIOCS80211JOIN, (caddr_t)&ifr) < 0) - warn("SIOCS80211JOIN"); + err(1, "SIOCS80211JOIN"); } void @@ -1799,8 +1799,7 @@ delifjoin(const char *val, int d) if (d == -1) { ifr.ifr_data = (caddr_t)&join; if (ioctl(s, SIOCS80211JOIN, (caddr_t)&ifr) < 0) - warn("SIOCS80211JOIN"); - return; + err(1, "SIOCS80211JOIN"); } len = sizeof(join.i_nwid); @@ -1812,7 +1811,7 @@ delifjoin(const char *val, int d) (void)strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); ifr.ifr_data = (caddr_t)&join; if (ioctl(s, SIOCS80211JOIN, (caddr_t)&ifr) < 0) - warn("SIOCS80211JOIN"); + err(1, "SIOCS80211JOIN"); } void @@ -1828,13 +1827,13 @@ delifjoinlist(const char *val, int d) if (d == -1) { ifr.ifr_data = (caddr_t)&join; if (ioctl(s, SIOCS80211JOIN, (caddr_t)&ifr) < 0) - warn("SIOCS80211JOIN"); + err(1, "SIOCS80211JOIN"); return; } ifr.ifr_data = (caddr_t)&join; if (ioctl(s, SIOCS80211JOIN, (caddr_t)&ifr) < 0) - warn("SIOCS80211JOIN"); + err(1, "SIOCS80211JOIN"); } void |