Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/ifconfig ifconfig: if SIOCGLIFADDR fails, continue to t...
details: https://anonhg.NetBSD.org/src/rev/e8ca28d64d82
branches: trunk
changeset: 940620:e8ca28d64d82
user: roy <roy%NetBSD.org@localhost>
date: Sun Oct 11 21:32:37 2020 +0000
description:
ifconfig: if SIOCGLIFADDR fails, continue to the next address
diffstat:
sbin/ifconfig/util.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r d48016088fc6 -r e8ca28d64d82 sbin/ifconfig/util.c
--- a/sbin/ifconfig/util.c Sun Oct 11 19:39:22 2020 +0000
+++ b/sbin/ifconfig/util.c Sun Oct 11 21:32:37 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.19 2019/10/01 10:52:53 kardel Exp $ */
+/* $NetBSD: util.c,v 1.20 2020/10/11 21:32:37 roy 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.19 2019/10/01 10:52:53 kardel Exp $");
+__RCSID("$NetBSD: util.c,v 1.20 2020/10/11 21:32:37 roy Exp $");
#endif /* not lint */
#include <ctype.h>
@@ -275,8 +275,10 @@
iflr.flags = IFLR_PREFIX;
iflr.prefixlen = sdl->sdl_alen * NBBY;
- if (prog_ioctl(s, SIOCGLIFADDR, &iflr) == -1)
+ if (prog_ioctl(s, SIOCGLIFADDR, &iflr) == -1) {
warn("%s: ioctl SIOCGLIFADDR", __func__);
+ continue;
+ }
if (((iflr.flags & IFLR_ACTIVE) != 0) != print_active_only)
continue;
Home |
Main Index |
Thread Index |
Old Index