summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Kotucek <pavel.kotucek@pantheon.tech>2018-12-05 17:16:23 +0100
committerNeale Ranns <nranns@cisco.com>2018-12-14 12:33:44 +0000
commit41b923a175a95ad61f2f7e0fc44727f78d8ec29e (patch)
treeb7823ab376f83e5648ee7f38cce5c07b433067ac
parentcbee13a13a0ba57835badf9ed7a816313b82ae3e (diff)
VPP-1510: add support for punt delete
Change-Id: Ibd7b1b13da0861f67e5e9e73bf6539199b3c82ea Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
-rw-r--r--src/vnet/ip/punt.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/vnet/ip/punt.c b/src/vnet/ip/punt.c
index c0902f346ff..65e62c07aba 100644
--- a/src/vnet/ip/punt.c
+++ b/src/vnet/ip/punt.c
@@ -759,7 +759,18 @@ vnet_punt_add_del (vlib_main_t * vm, u8 ipv, u8 protocol, u16 port,
return 0;
}
else
- return clib_error_return (0, "punt delete is not supported yet");
+ {
+ if (protocol == IP_PROTOCOL_TCP || protocol == IP_PROTOCOL_SCTP)
+ return clib_error_return (0,
+ "punt TCP/SCTP ports is not supported yet");
+ if (ipv == 4 || ipv == (u8) ~ 0)
+ udp_unregister_dst_port (vm, port, 1);
+
+ if (ipv == 6 || ipv == (u8) ~ 0)
+ udp_unregister_dst_port (vm, port, 0);
+
+ return 0;
+ }
}
static clib_error_t *