summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/route/route.c8
-rw-r--r--sbin/route/show.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index 1463c1035a0..edd1f0f0ee5 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.119 2008/05/09 07:14:56 henning Exp $ */
+/* $OpenBSD: route.c,v 1.120 2008/09/15 20:12:11 claudio Exp $ */
/* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */
/*
@@ -1238,7 +1238,7 @@ print_rtmsg(struct rt_msghdr *rtm, int msglen)
printf("\n");
break;
default:
- printf("priority %d, ", rtm->rtm_priority);
+ printf("priority %d, ", rtm->rtm_priority & RTP_MASK);
printf("table %u, pid: %ld, seq %d, errno %d\nflags:",
rtm->rtm_tableid, (long)rtm->rtm_pid, rtm->rtm_seq,
rtm->rtm_errno);
@@ -1250,7 +1250,7 @@ print_rtmsg(struct rt_msghdr *rtm, int msglen)
char *
priorityname(u_int8_t prio)
{
- switch (prio) {
+ switch (prio & RTP_MASK) {
case 0:
return ("none");
case 4:
@@ -1343,7 +1343,7 @@ print_getmsg(struct rt_msghdr *rtm, int msglen)
ifp->sdl_nlen, ifp->sdl_data);
if (ifa)
printf(" if address: %s\n", routename(ifa));
- printf(" priority: %u (%s)\n", rtm->rtm_priority,
+ printf(" priority: %u (%s)\n", rtm->rtm_priority & RTP_MASK,
priorityname(rtm->rtm_priority));
printf(" flags: ");
bprintf(stdout, rtm->rtm_flags, routeflags);
diff --git a/sbin/route/show.c b/sbin/route/show.c
index 62731ebdadd..0a10bbd1f5c 100644
--- a/sbin/route/show.c
+++ b/sbin/route/show.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: show.c,v 1.70 2008/05/25 17:57:42 deraadt Exp $ */
+/* $OpenBSD: show.c,v 1.71 2008/09/15 20:12:11 claudio Exp $ */
/* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */
/*
@@ -308,7 +308,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');
}