summaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorIgor Mikhailov (imichail) <imichail@cisco.com>2016-11-04 20:25:00 -0700
committerJohn Lo <loj@cisco.com>2016-11-07 16:00:39 +0000
commit80e8816b41282ad705aa64790f1e9652f8f36f14 (patch)
treec4e569f34ed0a2bb88f82d057c1ef87cabfd6eb2 /vnet
parentd4048a46bbd15ba95cd62ea29c18cf6e7ddccb20 (diff)
Restore punt/inject after FIB2.0
The tuntap punt/inject should be enabled for IPv4/6 RX once any vpp interface has an IP address. Change-Id: I4a507b7540b7464ed6d21035ac9b8f9463028c6f Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/unix/tuntap.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/vnet/vnet/unix/tuntap.c b/vnet/vnet/unix/tuntap.c
index 43ff06aa9ff..4eab3913780 100644
--- a/vnet/vnet/unix/tuntap.c
+++ b/vnet/vnet/unix/tuntap.c
@@ -753,6 +753,12 @@ tuntap_ip4_add_del_interface_address (ip4_main_t * im,
snprintf (ifr.ifr_name, sizeof(ifr.ifr_name),
"%s:%d", tm->tun_name, (int)(ap - tm->subifs));
+ /* the tuntap punt/inject is enabled for IPv4 RX so long as
+ * any vpp interface has an IPv4 address.
+ * this is also ref counted.
+ */
+ ip4_sw_interface_enable_disable (tm->sw_if_index, !is_delete);
+
if (! is_delete)
{
struct sockaddr_in * sin;
@@ -856,6 +862,12 @@ tuntap_ip6_add_del_interface_address (ip6_main_t * im,
snprintf (ifr.ifr_name, sizeof(ifr.ifr_name),
"%s:%d", tm->tun_name, (int)(ap - tm->subifs));
+ /* the tuntap punt/inject is enabled for IPv6 RX so long as
+ * any vpp interface has an IPv6 address.
+ * this is also ref counted.
+ */
+ ip6_sw_interface_enable_disable (tm->sw_if_index, !is_delete);
+
if (! is_delete)
{
int sockfd = socket (AF_INET6, SOCK_STREAM, 0);