From 5445f5fd9b9d020b285d48e571c86528932ac071 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 25 Apr 2017 16:16:00 -0700 Subject: vhost: Disallow duplicate path name for vhost interface When creating or modifying a vhost interface, verify if the path name already existed and reject the command. Change-Id: I8b2d33b77c847f774492874f7d194fa72c488479 Signed-off-by: Steven --- src/vnet/devices/virtio/vhost-user.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/vnet/devices/virtio/vhost-user.h') diff --git a/src/vnet/devices/virtio/vhost-user.h b/src/vnet/devices/virtio/vhost-user.h index 80f58a20..56b65477 100644 --- a/src/vnet/devices/virtio/vhost-user.h +++ b/src/vnet/devices/virtio/vhost-user.h @@ -228,6 +228,7 @@ typedef struct u32 unix_file_index; char sock_filename[256]; int sock_errno; + uword if_index; u32 hw_if_index, sw_if_index; //Feature negotiation @@ -311,6 +312,7 @@ typedef struct typedef struct { + mhash_t if_index_by_sock_name; u32 mtu_bytes; vhost_user_intf_t *vhost_user_interfaces; u32 *show_dev_instance_by_real_dev_instance; -- cgit 1.2.3-korg