summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2009-07-23 14:23:07 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2009-07-23 14:23:07 +0000
commit0830473ffdea46f4046c4676e523d641c5009fea (patch)
treee895d0d78b6a1efb0f36918dbcff2eb2c1e28595
parent58f9e0f19d9f1c81098344fa389379fdb38be382 (diff)
Always print interface names, not just ifindex, even when -n is
specified. Most people want -n to avoid reverse DNS lookups, and it's stupid not to print a useful interface name just for that. YES PLEASE! Ok claudio@
-rw-r--r--sbin/route/route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index e69f8c7a1fd..931452ebd20 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.136 2009/07/23 14:19:52 claudio Exp $ */
+/* $OpenBSD: route.c,v 1.137 2009/07/23 14:23:06 sthen Exp $ */
/* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */
/*
@@ -1274,7 +1274,7 @@ print_rtmsg(struct rt_msghdr *rtm, int msglen)
case RTM_IFINFO:
ifm = (struct if_msghdr *)rtm;
(void) printf("if# %d, ", ifm->ifm_index);
- if (!nflag && if_indextoname(ifm->ifm_index, ifname) != NULL)
+ if (if_indextoname(ifm->ifm_index, ifname) != NULL)
printf("name: %s, ", ifname);
printf("link: %s, flags:",
get_linkstate(ifm->ifm_data.ifi_type,