summaryrefslogtreecommitdiff
path: root/sbin/route/show.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-01-11 08:26:30 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-01-11 08:26:30 +0000
commitf02b085b43a5c125da50802a90269c076201e37c (patch)
tree600fc9800b5613ee0cfa53c581de0961a1f3474f /sbin/route/show.c
parentd030e2a529214003c930ca152cfc6419eb838e7f (diff)
"default" routes need a mask of 0 too.
from and ok claudio@
Diffstat (limited to 'sbin/route/show.c')
-rw-r--r--sbin/route/show.c4
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)