From d6361c7b899aa8ca8643c0d0c93fce25f3e78be2 Mon Sep 17 00:00:00 2001 From: Steven Luong Date: Tue, 26 Jan 2021 23:44:19 -0800 Subject: vhost: vhost interface hardware address not set The check args->hwaddr is always true and it always copies the mac address from args->hwaddr even though none was set. Check args->use_custom_mac instead. Type: fix Fixes: gerrit 29970 Signed-off-by: Steven Luong Change-Id: I0c51bf1ea79b02c4fbdc3c52e694f186bdd96600 --- src/vnet/devices/virtio/vhost_user_api.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/vnet/devices/virtio/vhost_user_api.c') diff --git a/src/vnet/devices/virtio/vhost_user_api.c b/src/vnet/devices/virtio/vhost_user_api.c index a4e027f214e..86656883bd8 100644 --- a/src/vnet/devices/virtio/vhost_user_api.c +++ b/src/vnet/devices/virtio/vhost_user_api.c @@ -86,6 +86,7 @@ vl_api_create_vhost_user_if_t_handler (vl_api_create_vhost_user_if_t * mp) if (mp->use_custom_mac) mac_address_decode (mp->mac_address, (mac_address_t *) args.hwaddr); + args.use_custom_mac = mp->use_custom_mac; args.is_server = mp->is_server; args.sock_filename = (char *) mp->sock_filename; args.renumber = mp->renumber; -- cgit 1.2.3-korg