summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2008-12-16 16:21:10 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2008-12-16 16:21:10 +0000
commit7c0ac147ef5862f46ff1ae78fd2381249cc49185 (patch)
tree33ec85bcb8aeb7c65c311d48e7a21f76d8217567
parent66f602cf3edb31a30ff3fcee9bd3d4b9d4ff57a7 (diff)
Use macros from route.h when mapping route priorities to names; the
hardcoded values used here before were incorrect. ok claudio@
-rw-r--r--sbin/route/route.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index c6ec0ff09d2..8c07e72fe2f 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.122 2008/12/15 16:14:57 michele Exp $ */
+/* $OpenBSD: route.c,v 1.123 2008/12/16 16:21:09 sthen Exp $ */
/* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */
/*
@@ -1242,21 +1242,21 @@ char *
priorityname(u_int8_t prio)
{
switch (prio & RTP_MASK) {
- case 0:
+ case RTP_NONE:
return ("none");
- case 4:
+ case RTP_CONNECTED:
return ("connected");
- case 8:
+ case RTP_STATIC:
return ("static");
- case 16:
+ case RTP_OSPF:
return ("ospf");
- case 20:
+ case RTP_ISIS:
return ("is-is");
- case 24:
+ case RTP_RIP:
return ("rip");
- case 32:
+ case RTP_BGP:
return ("bgp");
- case 48:
+ case RTP_DEFAULT:
return ("default");
default:
return ("");