summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/show.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2008-09-15 20:13:10 +0000
committerclaudio <claudio@openbsd.org>2008-09-15 20:13:10 +0000
commit31ff172ac23b0b643e1617d01ffe24f45faa94a9 (patch)
tree1b5775187edf39091950ee324b4afecc3e163c9f /usr.bin/netstat/show.c
parentMask rtm->rtm_priority with RTP_MASK before printing so that the priority is (diff)
downloadwireguard-openbsd-31ff172ac23b0b643e1617d01ffe24f45faa94a9.tar.xz
wireguard-openbsd-31ff172ac23b0b643e1617d01ffe24f45faa94a9.zip
Similar to route(8) change mask rtm->rtm_priority with RTP_MASK to show
correct values. OK henning@
Diffstat (limited to 'usr.bin/netstat/show.c')
-rw-r--r--usr.bin/netstat/show.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/netstat/show.c b/usr.bin/netstat/show.c
index 38381899625..7ab0927b866 100644
--- a/usr.bin/netstat/show.c
+++ b/usr.bin/netstat/show.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: show.c,v 1.13 2008/05/08 07:19:42 claudio Exp $ */
+/* $OpenBSD: show.c,v 1.14 2008/09/15 20:13:10 claudio Exp $ */
/* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */
/*
@@ -305,7 +305,7 @@ p_rtentry(struct rt_msghdr *rtm)
else
printf("%5s ", "-");
putchar((rtm->rtm_rmx.rmx_locks & RTV_MTU) ? 'L' : ' ');
- printf(" %2d %.16s", rtm->rtm_priority,
+ printf(" %2d %.16s", rtm->rtm_priority & RTP_MASK,
if_indextoname(rtm->rtm_index, ifbuf));
putchar('\n');
}