diff options
Diffstat (limited to 'sbin/route/route.c')
-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++; |