Use bitwise comparison when checking flags set by the kernel for the device.
Signed-off-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com> --- lib/netdev-windows.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/netdev-windows.c b/lib/netdev-windows.c index 423a00b..f5e809e 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; } -- 2.9.2.windows.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev