Module Name: src
Committed By: christos
Date: Wed Jul 13 21:57:02 UTC 2016
Modified Files:
src/usr.bin/netstat: main.c
Log Message:
Use sysctl for interface printing (-i), leave on for multicast address printing
(-ia) and comment in the code where this is missing?
XXX: should that be an ioctl or sysctl? provide getifmultiaddrs() via the
routing socket? I guess since this is just for netstat a simple sysctl or
ioctl would suffice. I lean towards sysctl.
To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/usr.bin/netstat/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/netstat/main.c
diff -u src/usr.bin/netstat/main.c:1.95 src/usr.bin/netstat/main.c:1.96
--- src/usr.bin/netstat/main.c:1.95 Tue Nov 11 22:34:59 2014
+++ src/usr.bin/netstat/main.c Wed Jul 13 17:57:01 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.95 2014/11/12 03:34:59 christos Exp $ */
+/* $NetBSD: main.c,v 1.96 2016/07/13 21:57:01 christos Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
#if 0
static char sccsid[] = "from: @(#)main.c 8.4 (Berkeley) 3/1/94";
#else
-__RCSID("$NetBSD: main.c,v 1.95 2014/11/12 03:34:59 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.96 2016/07/13 21:57:01 christos Exp $");
#endif
#endif /* not lint */
@@ -358,7 +358,7 @@ prepare(const char *nf, const char *mf,
*/
use_sysctl = 0;
} else if (qflag ||
- iflag ||
+ (iflag && aflag) || /* For multicast */
#ifndef SMALL
gflag ||
#endif