From 0830473ffdea46f4046c4676e523d641c5009fea Mon Sep 17 00:00:00 2001 From: Stuart Henderson Date: Thu, 23 Jul 2009 14:23:07 +0000 Subject: 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@ --- sbin/route/route.c | 4 ++-- 1 file 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, -- cgit v1.2.3