Skip to content

Commit

Permalink
netdev-windows: use bitwise comparison for flags
Browse files Browse the repository at this point in the history
Use bitwise comparison when checking flags set by the kernel for the
device.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
  • Loading branch information
Alin Serdean authored and shettyg committed Nov 4, 2016
1 parent 583d346 commit fa41c89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/netdev-windows.c
Expand Up @@ -138,11 +138,11 @@ dp_to_netdev_ifi_flags(uint32_t dp_flags)
{
uint32_t nd_flags = 0;

if (dp_flags && OVS_WIN_NETDEV_IFF_UP) {
if (dp_flags & OVS_WIN_NETDEV_IFF_UP) {
nd_flags |= NETDEV_UP;
}

if (dp_flags && OVS_WIN_NETDEV_IFF_PROMISC) {
if (dp_flags & OVS_WIN_NETDEV_IFF_PROMISC) {
nd_flags |= NETDEV_PROMISC;
}

Expand Down

0 comments on commit fa41c89

Please sign in to comment.