diff options
author | Andrew Gallatin <gallatin@FreeBSD.org> | 2018-04-17 12:54:58 +0000 |
---|---|---|
committer | Andrew Gallatin <gallatin@FreeBSD.org> | 2018-04-17 12:54:58 +0000 |
commit | 47528c67efac952d08840ed54f0b93682a6008a8 (patch) | |
tree | 336edcf624b6517b2aa0993c5a80723e46c561ee /sbin/ifconfig/ifclone.c | |
parent | 604f1c416c128565923d63ab4cd98d1a7ced0cf4 (diff) |
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.
Reviewed by: jtl, glebius
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D15046
Notes
Notes:
svn path=/head/; revision=332645
Diffstat (limited to 'sbin/ifconfig/ifclone.c')
-rw-r--r-- | sbin/ifconfig/ifclone.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifclone.c b/sbin/ifconfig/ifclone.c index 5e23501ae03c..c264a444dcf0 100644 --- a/sbin/ifconfig/ifclone.c +++ b/sbin/ifconfig/ifclone.c @@ -181,7 +181,7 @@ static void clone_Copt_cb(const char *optarg __unused) { list_cloners(); - exit(0); + exit(exit_code); } static struct option clone_Copt = { .opt = "C", .opt_usage = "[-C]", .cb = clone_Copt_cb }; |