git: ifconfig(8): Make lagg creation more fault-tolerant
Aaron LI
aly at crater.dragonflybsd.org
Fri Jun 26 07:55:28 PDT 2020
commit 598a666bccff5d91ec5bc75a130e6b7d19147d49
Author: Aaron LI <aly at aaronly.me>
Date: Sun Apr 12 21:29:32 2020 +0800
ifconfig(8): Make lagg creation more fault-tolerant
* Warn, don't exit, when SIOCSLAGGPORT returns an error.
When we exit with an error during lagg creation, a single failed NIC
(which no longer attaches) can prevent lagg creation and other
configuration, such as adding an IPv4 address, and thus leave a
machine unreachable.
* Preserve non-EEXISTS errors for exit status from SIOCSLAGGPORT, in
case scripts are looking for it. Hopefully this can be extended if
other parts of ifconfig can allow a "soft" failure.
* Improve the warning message to mention what lagg and what member are
problematic.
Obtained from FreeBSD:
https://github.com/freebsd/freebsd/commit/dde41c97866152e8c7eb1f52f07e3e5ac43b2652
https://reviews.freebsd.org/D15046
Summary of changes:
sbin/ifconfig/ifclone.c | 5 +++--
sbin/ifconfig/ifconfig.c | 5 +++--
sbin/ifconfig/ifconfig.h | 1 +
sbin/ifconfig/ifgroup.c | 4 ++--
sbin/ifconfig/iflagg.c | 14 +++++++++++---
5 files changed, 20 insertions(+), 9 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/598a666bccff5d91ec5bc75a130e6b7d19147d49
--
DragonFly BSD source repository
More information about the Commits
mailing list