summaryrefslogtreecommitdiffstats
path: root/freebsd/sbin/ifconfig/iflagg.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sbin/ifconfig/iflagg.c')
-rw-r--r--freebsd/sbin/ifconfig/iflagg.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/freebsd/sbin/ifconfig/iflagg.c b/freebsd/sbin/ifconfig/iflagg.c
index d659ed57..4952196a 100644
--- a/freebsd/sbin/ifconfig/iflagg.c
+++ b/freebsd/sbin/ifconfig/iflagg.c
@@ -53,9 +53,17 @@ setlaggport(const char *val, int d, int s, const struct afswtch *afp)
strlcpy(rp.rp_ifname, name, sizeof(rp.rp_ifname));
strlcpy(rp.rp_portname, val, sizeof(rp.rp_portname));
- /* Don't choke if the port is already in this lagg. */
- if (ioctl(s, SIOCSLAGGPORT, &rp) && errno != EEXIST)
- err(1, "SIOCSLAGGPORT");
+ /*
+ * Do not exit with an error here. Doing so permits a
+ * failed NIC to take down an entire lagg.
+ *
+ * Don't error at all if the port is already in the lagg.
+ */
+ if (ioctl(s, SIOCSLAGGPORT, &rp) && errno != EEXIST) {
+ warnx("%s %s: SIOCSLAGGPORT: %s",
+ name, val, strerror(errno));
+ exit_code = 1;
+ }
}
static void