diff options
author | Alin Serdean <aserdean@cloudbasesolutions.com> | 2016-10-27 19:20:26 +0000 |
---|---|---|
committer | Gurucharan Shetty <guru@ovn.org> | 2016-11-04 08:07:55 -0700 |
commit | fa41c89ced01580fc61356ee721e336c60266f4b (patch) | |
tree | 27266a827adb157920ee8a75741e8201ede680da | |
parent | 583d34678d32482d616fe5bd7dc323f044788898 (diff) | |
download | openvswitch-fa41c89ced01580fc61356ee721e336c60266f4b.tar.gz |
netdev-windows: use bitwise comparison for flags
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>
-rw-r--r-- | lib/netdev-windows.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/netdev-windows.c b/lib/netdev-windows.c index 423a00b41..f5e809ea0 100644 --- a/lib/netdev-windows.c +++ b/lib/netdev-windows.c @@ -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; } |