Skip to content

Commit

Permalink
Switch from internal port to all ports defined
Browse files Browse the repository at this point in the history
This patch changes the way we try to figure out if a port is defined on a given switch.

Instead of looking only in the internal ports defined switch to all ports defined.

This caused issues when trying to add a Hyper-V container port to a given OVS bridge.

Reported-by: Danting Liu <[email protected]>
Signed-off-by: Alin Gabriel Serdean <[email protected]>
Acked-by: Anand Kumar <[email protected]>
  • Loading branch information
aserdean committed Aug 13, 2019
1 parent aacad86 commit 58b34b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ create_wmi_port(char *name) {

/* Check if the element already exists on the switch. */
wchar_t internal_port_query[WMI_QUERY_COUNT] = L"SELECT * FROM "
L"Msvm_InternalEthernetPort WHERE ElementName = \"";
L"CIM_EthernetPort WHERE ElementName = \"";

wide_name = xmalloc((strlen(name) + 1) * sizeof(wchar_t));

Expand Down

0 comments on commit 58b34b0

Please sign in to comment.