Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/ifconfig PR/54513 ifconfig exits on newly created carp ...



details:   https://anonhg.NetBSD.org/src/rev/6039fb0a69b8
branches:  trunk
changeset: 454884:6039fb0a69b8
user:      kardel <kardel%NetBSD.org@localhost>
date:      Tue Oct 01 10:52:53 2019 +0000

description:
PR/54513 ifconfig exits on newly created carp interfaces
downgrade from err(EXIT_FAILURE, ... ) to warn() if ioctl(SIOCGLIFADDR) fails.
ifconfig now survives freshly created carp interfaces.

diffstat:

 sbin/ifconfig/util.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r ce7f8ddcb922 -r 6039fb0a69b8 sbin/ifconfig/util.c
--- a/sbin/ifconfig/util.c      Tue Oct 01 10:38:15 2019 +0000
+++ b/sbin/ifconfig/util.c      Tue Oct 01 10:52:53 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.18 2019/08/16 10:33:17 msaitoh Exp $        */
+/*     $NetBSD: util.c,v 1.19 2019/10/01 10:52:53 kardel Exp $ */
 
 /*-
  * Copyright (c) 2008 David Young.  All rights reserved.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: util.c,v 1.18 2019/08/16 10:33:17 msaitoh Exp $");
+__RCSID("$NetBSD: util.c,v 1.19 2019/10/01 10:52:53 kardel Exp $");
 #endif /* not lint */
 
 #include <ctype.h>
@@ -276,7 +276,7 @@
                iflr.prefixlen = sdl->sdl_alen * NBBY;
 
                if (prog_ioctl(s, SIOCGLIFADDR, &iflr) == -1)
-                       err(EXIT_FAILURE, "%s: ioctl", __func__);
+                       warn("%s: ioctl SIOCGLIFADDR", __func__);
 
                if (((iflr.flags & IFLR_ACTIVE) != 0) != print_active_only)
                        continue;



Home | Main Index | Thread Index | Old Index