Signed-off-by: Shi Lei <shi_lei@xxxxxxxxxxxxxx> --- src/util/virnetdev.c | 2 ++ src/util/virnetdev.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 5ff8e35f..ff1b1fa0 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -102,6 +102,7 @@ VIR_ENUM_IMPL(virNetDevGenNameType, "tap", "macvtap", "macvlan", + "veth", ); static virNetDevGenName @@ -110,6 +111,7 @@ virNetDevGenNames[VIR_NET_DEV_GEN_NAME_LAST] = { {-1, VIR_NET_GENERATED_TAP_PREFIX, VIR_MUTEX_INITIALIZER}, {-1, VIR_NET_GENERATED_MACVTAP_PREFIX, VIR_MUTEX_INITIALIZER}, {-1, VIR_NET_GENERATED_MACVLAN_PREFIX, VIR_MUTEX_INITIALIZER}, + {-1, VIR_NET_GENERATED_VETH_PREFIX, VIR_MUTEX_INITIALIZER}, }; typedef enum { diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h index 19f37b61..097d0f8e 100644 --- a/src/util/virnetdev.h +++ b/src/util/virnetdev.h @@ -40,6 +40,8 @@ typedef void virIfreq; */ #define VIR_NET_GENERATED_TAP_PREFIX "vnet" +#define VIR_NET_GENERATED_VETH_PREFIX "veth" + /* libvirt will start macvtap/macvlan interface names with one of * these prefixes when it auto-generates the name */ @@ -156,6 +158,7 @@ typedef enum { VIR_NET_DEV_GEN_NAME_TAP, VIR_NET_DEV_GEN_NAME_MACVTAP, VIR_NET_DEV_GEN_NAME_MACVLAN, + VIR_NET_DEV_GEN_NAME_VETH, VIR_NET_DEV_GEN_NAME_LAST } virNetDevGenNameType; -- 2.25.1