Skip to content

Commit

Permalink
windows: Broken internal netdevs
Browse files Browse the repository at this point in the history
Commit fa07525 fixed error logging for
for regular netdevs, however it overlooked "internal" netdevs.

This patch allows "internal" netdev objects to be created and passed to
dpif_port_add().

Reported-by: Nithin Raju <[email protected]>
Signed-off-by: Alin Gabriel Serdean <[email protected]>
Acked-by: Nithin Raju <[email protected]>
Signed-off-by: Gurucharan Shetty <[email protected]>
  • Loading branch information
Alin Serdean authored and shettyg committed Feb 22, 2017
1 parent 1102cc3 commit fb55a74
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/netdev-windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ netdev_windows_system_construct(struct netdev *netdev_)

/* Query the attributes and runtime status of the netdev. */
ret = query_netdev(netdev_get_name(&netdev->up), &info, &buf);
if (ret) {
/* "Internal" netdevs do not exist in the kernel yet. They need to be
* transformed into a netdev object and passed to dpif_port_add(), which
* will add them to the kernel. */
if (strcmp(netdev_get_type(&netdev->up), "internal") && ret) {
return ret;
}
ofpbuf_delete(buf);
Expand Down

0 comments on commit fb55a74

Please sign in to comment.