diff options
author | Juraj Sloboda <jsloboda@cisco.com> | 2018-09-28 12:04:26 +0200 |
---|---|---|
committer | Yichen Wang <yicwang@cisco.com> | 2018-11-03 19:24:38 +0000 |
commit | 31aa6f267fef1b152e9d5a58ab7f25396e3d0dfb (patch) | |
tree | 2dca60cc0280a5c91f6d35ee98e0487c509d1d92 | |
parent | c548f5df3ff41f76bac585923ffb1fc72c80766b (diff) |
vhost_user: Fix setting MTU using uninitialized variable
Change-Id: I0caa5fd584e3785f237d08f3d3be23e9bfee7605
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
(cherry picked from commit 83c46a2c5c97320e029b4dd154a45212530f221d)
-rw-r--r-- | src/vnet/devices/virtio/vhost_user.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vnet/devices/virtio/vhost_user.c b/src/vnet/devices/virtio/vhost_user.c index 796be4b80a2..6b33af12dca 100644 --- a/src/vnet/devices/virtio/vhost_user.c +++ b/src/vnet/devices/virtio/vhost_user.c @@ -1359,8 +1359,6 @@ vhost_user_create_ethernet (vnet_main_t * vnm, vlib_main_t * vm, if (error) clib_error_report (error); - - vnet_sw_interface_set_mtu (vnm, vui->sw_if_index, 9000); } /* @@ -1471,6 +1469,7 @@ vhost_user_create_if (vnet_main_t * vnm, vlib_main_t * vm, vhost_user_create_ethernet (vnm, vm, vui, hwaddr); vhost_user_vui_init (vnm, vui, server_sock_fd, sock_filename, feature_mask, &sw_if_idx); + vnet_sw_interface_set_mtu (vnm, vui->sw_if_index, 9000); if (renumber) vnet_interface_name_renumber (sw_if_idx, custom_dev_instance); |