From f9c09c03bed9346b6f86a3762199f753091dcc06 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Tue, 6 May 2008 03:45:34 +0000 Subject: Add code to specify the mpls label switching operation. OK norby@ --- sbin/route/route.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'sbin/route/route.c') 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++; -- cgit v1.2.3