summaryrefslogtreecommitdiff
path: root/usr.bin/netstat/main.c
diff options
context:
space:
mode:
authorDavid Hill <dhill@cvs.openbsd.org>2010-07-14 23:44:42 +0000
committerDavid Hill <dhill@cvs.openbsd.org>2010-07-14 23:44:42 +0000
commit63ce71ec7b796505265c7f532399bea37b2df8b1 (patch)
treed2d7be2887ff39f9be19cc201304783109f9c840 /usr.bin/netstat/main.c
parentce14d3791ea5b3229c8a58fbd7a605fe0c78f1e1 (diff)
pass the correct af if not specified.
fixes printing active connections twice. ok claudio@
Diffstat (limited to 'usr.bin/netstat/main.c')
-rw-r--r--usr.bin/netstat/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c
index 204e58ce0d3..07803db6911 100644
--- a/usr.bin/netstat/main.c
+++ b/usr.bin/netstat/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.84 2010/06/30 03:32:55 lum Exp $ */
+/* $OpenBSD: main.c,v 1.85 2010/07/14 23:44:41 dhill Exp $ */
/* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */
/*
@@ -420,7 +420,7 @@ main(int argc, char *argv[])
break;
if (tp->pr_name == 0)
continue;
- printproto(tp, p->p_name, af);
+ printproto(tp, p->p_name, AF_INET);
}
endprotoent();
}
@@ -430,7 +430,7 @@ main(int argc, char *argv[])
}
if (af == AF_INET6 || af == AF_UNSPEC)
for (tp = ip6protox; tp->pr_name; tp++)
- printproto(tp, tp->pr_name, af);
+ printproto(tp, tp->pr_name, AF_INET6);
if ((af == AF_UNIX || af == AF_UNSPEC) && !sflag)
unixpr(nl[N_UNIXSW].n_value);
if (af == AF_APPLETALK || af == AF_UNSPEC)