diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-05-06 03:45:34 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-05-06 03:45:34 +0000 |
commit | f9c09c03bed9346b6f86a3762199f753091dcc06 (patch) | |
tree | 0baa3e9ecc3c88155377166dde6ea7c62c04d238 /sbin/route | |
parent | 52aca7715fbb9cd6060bc34753ee23c8682629a2 (diff) |
Add code to specify the mpls label switching operation. OK norby@
Diffstat (limited to 'sbin/route')
-rw-r--r-- | sbin/route/route.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index 5e2d977d038..0071b532e61 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.114 2008/05/06 03:44:14 claudio Exp $ */ +/* $OpenBSD: route.c,v 1.115 2008/05/06 03:45:33 claudio Exp $ */ /* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */ /* @@ -391,6 +391,21 @@ newroute(int argc, char **argv) errx(1, "-out requires -mpls"); getmplslabel(*++argv, 0); break; + case K_POP: + if (af != AF_MPLS) + errx(1, "-pop requires -mpls"); + so_dst.smpls.smpls_operation = MPLS_OP_POP; + break; + case K_PUSH: + if (af != AF_MPLS) + errx(1, "-push requires -mpls"); + so_dst.smpls.smpls_operation = MPLS_OP_PUSH; + break; + case K_SWAP: + if (af != AF_MPLS) + errx(1, "-swap requires -mpls"); + so_dst.smpls.smpls_operation = MPLS_OP_SWAP; + break; case K_IFACE: case K_INTERFACE: iflag++; |