diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-01-11 08:28:45 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-01-11 08:28:45 +0000 |
commit | f22c79ddda0813dd716d5fd3cc20a01b2dfcb6ed (patch) | |
tree | 3a531d819cff67918accb42350851e43dc0760f4 /usr.bin/netstat | |
parent | f02b085b43a5c125da50802a90269c076201e37c (diff) |
"default" routes need a mask of 0 too.
from and ok claudio@
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/show.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/netstat/show.c b/usr.bin/netstat/show.c index f1db27e0da3..0f9d35e3d98 100644 --- a/usr.bin/netstat/show.c +++ b/usr.bin/netstat/show.c @@ -1,4 +1,4 @@ -/* $OpenBSD: show.c,v 1.27 2009/08/07 09:09:31 martynas Exp $ */ +/* $OpenBSD: show.c,v 1.28 2010/01/11 08:28:44 dlg Exp $ */ /* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */ /* @@ -710,7 +710,7 @@ netname4(in_addr_t in, in_addr_t mask) if ((np = getnetbyaddr(in, AF_INET)) != NULL) cp = np->n_name; } - if (in == INADDR_ANY) + if (in == INADDR_ANY && mask == INADDR_ANY) cp = "default"; mbits = mask ? 33 - ffs(mask) : 0; if (cp) |