aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-06-26 13:47:21 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-07-01 10:06:30 +0000
commitd4b5fdde42475c90a4b3d5156d03a0a72b145669 (patch)
tree2725959c9bcd590643f47c22271f0803d0a207af
parent6d52257a2d631ede2ed5136247690f9ac13e1409 (diff)
tap: remove the bridge configurations for TUN interface
Type: fix Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ifeae641ec0aa7de74e33e582234505bf6e28ca87 (cherry picked from commit add4a412d1f5271be21f99fe15a93cb73c38b833)
-rw-r--r--src/vnet/devices/tap/tap.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/vnet/devices/tap/tap.c b/src/vnet/devices/tap/tap.c
index ea16f76bcb0..02cd2610a7d 100644
--- a/src/vnet/devices/tap/tap.c
+++ b/src/vnet/devices/tap/tap.c
@@ -457,16 +457,17 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args)
args->rv = VNET_API_ERROR_NETLINK_ERROR;
goto error;
}
- }
- if (args->host_bridge)
- {
- args->error = vnet_netlink_set_link_master (vif->ifindex,
- (char *) args->host_bridge);
- if (args->error)
+ if (args->host_bridge)
{
- args->rv = VNET_API_ERROR_NETLINK_ERROR;
- goto error;
+ args->error = vnet_netlink_set_link_master (vif->ifindex,
+ (char *)
+ args->host_bridge);
+ if (args->error)
+ {
+ args->rv = VNET_API_ERROR_NETLINK_ERROR;
+ goto error;
+ }
}
}
@@ -666,10 +667,10 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args)
ethernet_mac_address_generate (args->mac_addr.bytes);
clib_memcpy (vif->mac_addr, args->mac_addr.bytes, 6);
+ vif->host_bridge = format (0, "%s%c", args->host_bridge, 0);
}
vif->host_if_name = format (0, "%s%c", host_if_name, 0);
vif->net_ns = format (0, "%s%c", args->host_namespace, 0);
- vif->host_bridge = format (0, "%s%c", args->host_bridge, 0);
vif->host_mtu_size = args->host_mtu_size;
clib_memcpy (vif->host_mac_addr, args->host_mac_addr.bytes, 6);
vif->host_ip4_prefix_len = args->host_ip4_prefix_len;