summaryrefslogtreecommitdiff
path: root/sbin/route/show.c
diff options
context:
space:
mode:
authorMichele Marchetto <michele@cvs.openbsd.org>2009-04-28 12:09:37 +0000
committerMichele Marchetto <michele@cvs.openbsd.org>2009-04-28 12:09:37 +0000
commitcacc01fc73d29b7231e7a8069ffcd331e6f03a1e (patch)
tree37170a0b7e7261f304d28e35c2749d2a828fea7b /sbin/route/show.c
parent6bcde5d977a5f0f33a32ea5c22cfe7999c602030 (diff)
Sync with kernel changes.
Add support to route(8) for a new dummy operation to allow packets coming in with a particular label to leave the MPLS cloud and join ipv4/ipv6 stack. ok claudio@ laurent@
Diffstat (limited to 'sbin/route/show.c')
-rw-r--r--sbin/route/show.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/route/show.c b/sbin/route/show.c
index f44db3a06d1..d2362147377 100644
--- a/sbin/route/show.c
+++ b/sbin/route/show.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: show.c,v 1.76 2009/02/03 16:44:15 michele Exp $ */
+/* $OpenBSD: show.c,v 1.77 2009/04/28 12:09:35 michele Exp $ */
/* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */
/*
@@ -550,7 +550,7 @@ p_sockaddr_mpls(struct sockaddr *in, struct sockaddr *out, int flags, int width)
if (in->sa_family != AF_MPLS)
return;
- if (flags & MPLS_OP_POP)
+ if (flags & MPLS_OP_POP || flags == MPLS_OP_LOCAL)
cp = label_print(in, NULL);
else
cp = label_print(in, out);
@@ -885,6 +885,8 @@ char *
label_print_op(u_int32_t type)
{
switch (type & (MPLS_OP_PUSH | MPLS_OP_POP | MPLS_OP_SWAP)) {
+ case MPLS_OP_LOCAL:
+ return ("LOCAL");
case MPLS_OP_POP:
return ("POP");
case MPLS_OP_SWAP: