summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2009-07-23 14:23:06 +0000
committersthen <sthen@openbsd.org>2009-07-23 14:23:06 +0000
commit5101f377a50c78facda082276be1664788dadfe7 (patch)
tree821890834e0ac414e42aad1c35b7ab48a3806125
parentOnly print unknown in RTM_IFINFO messages when the link is in (diff)
downloadwireguard-openbsd-5101f377a50c78facda082276be1664788dadfe7.tar.xz
wireguard-openbsd-5101f377a50c78facda082276be1664788dadfe7.zip
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,