diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-01-11 08:26:30 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-01-11 08:26:30 +0000 |
commit | f02b085b43a5c125da50802a90269c076201e37c (patch) | |
tree | 600fc9800b5613ee0cfa53c581de0961a1f3474f /sbin | |
parent | d030e2a529214003c930ca152cfc6419eb838e7f (diff) |
"default" routes need a mask of 0 too.
from and ok claudio@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/route/show.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/route/show.c b/sbin/route/show.c index 60cd4cc477a..f8b7228178f 100644 --- a/sbin/route/show.c +++ b/sbin/route/show.c @@ -1,4 +1,4 @@ -/* $OpenBSD: show.c,v 1.81 2009/08/07 09:09:31 martynas Exp $ */ +/* $OpenBSD: show.c,v 1.82 2010/01/11 08:26:29 dlg Exp $ */ /* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */ /* @@ -703,7 +703,7 @@ netname4(in_addr_t in, struct sockaddr_in *maskp) 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) |