diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-05-31 18:02:29 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-05-31 18:02:29 +0000 |
commit | cdc54a968754fce85ee42dbe16f6e299e18f6ebf (patch) | |
tree | 335a9db0a5d7a71b4a4044f6a972292adb1a4d94 | |
parent | 165d43adee954b733a1e9a1d09b662ca7014bf06 (diff) |
Masking the priority with RTP_MASK is no longer needed in userland.
Kernel will do this now.
-rw-r--r-- | sbin/route/route.c | 8 | ||||
-rw-r--r-- | sbin/route/show.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index be74d34b4c1..e903a917084 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.131 2009/05/30 21:06:34 claudio Exp $ */ +/* $OpenBSD: route.c,v 1.132 2009/05/31 18:02:28 claudio Exp $ */ /* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */ /* @@ -1303,7 +1303,7 @@ print_rtmsg(struct rt_msghdr *rtm, int msglen) printf("\n"); break; default: - printf("priority %d, ", rtm->rtm_priority & RTP_MASK); + printf("priority %d, ", rtm->rtm_priority); printf("table %u, pid: %ld, seq %d, errno %d\nflags:", rtm->rtm_tableid, (long)rtm->rtm_pid, rtm->rtm_seq, rtm->rtm_errno); @@ -1315,7 +1315,7 @@ print_rtmsg(struct rt_msghdr *rtm, int msglen) char * priorityname(u_int8_t prio) { - switch (prio & RTP_MASK) { + switch (prio) { case RTP_NONE: return ("none"); case RTP_CONNECTED: @@ -1408,7 +1408,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 & RTP_MASK, + printf(" priority: %u (%s)\n", rtm->rtm_priority, 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 f8bd370c1dd..68a6dad167b 100644 --- a/sbin/route/show.c +++ b/sbin/route/show.c @@ -1,4 +1,4 @@ -/* $OpenBSD: show.c,v 1.78 2009/05/23 16:44:12 chris Exp $ */ +/* $OpenBSD: show.c,v 1.79 2009/05/31 18:02:28 claudio Exp $ */ /* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */ /* @@ -314,7 +314,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 & RTP_MASK, + printf(" %2d %.16s", rtm->rtm_priority, if_indextoname(rtm->rtm_index, ifbuf)); putchar('\n'); } |