diff options
author | Sairam Venugopal <vsairam@vmware.com> | 2016-07-01 13:49:35 -0700 |
---|---|---|
committer | Gurucharan Shetty <guru@ovn.org> | 2016-07-01 20:52:54 -0700 |
commit | f5d29e922c0ee44999955dc7f1de37e9e3225527 (patch) | |
tree | 6c37f6da1a75a36db3ef12151899af0216e25f23 /lib/netlink-conntrack.c | |
parent | e0467f6dfc1b5df216cc192f5aaf65c30c02247c (diff) | |
download | openvswitch-f5d29e922c0ee44999955dc7f1de37e9e3225527.tar.gz |
Windows: Ignore the dpif conversions for windows in netlink-conntrack.c
The flags and state sent by Windows datapath are currently in the
userspace format. So prevent further translation.
Signed-off-by: Sairam Venugopal <vsairam@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Diffstat (limited to 'lib/netlink-conntrack.c')
-rw-r--r-- | lib/netlink-conntrack.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/netlink-conntrack.c b/lib/netlink-conntrack.c index ad9f0b71b..5132bf283 100644 --- a/lib/netlink-conntrack.c +++ b/lib/netlink-conntrack.c @@ -525,6 +525,10 @@ nl_ct_parse_tuple(struct nlattr *nla, struct ct_dpif_tuple *tuple, static uint8_t nl_ct_tcp_state_to_dpif(uint8_t state) { +#ifdef _WIN32 + /* Windows currently sends up CT_DPIF_TCP state */ + return state; +#else switch (state) { case TCP_CONNTRACK_NONE: return CT_DPIF_TCPS_CLOSED; @@ -549,17 +553,23 @@ nl_ct_tcp_state_to_dpif(uint8_t state) default: return CT_DPIF_TCPS_CLOSED; } +#endif } static uint8_t ip_ct_tcp_flags_to_dpif(uint8_t flags) { +#ifdef _WIN32 + /* Windows currently sends up CT_DPIF_TCP flags */ + return flags; +#else uint8_t ret = 0; #define CT_DPIF_TCP_FLAG(FLAG) \ ret |= (flags & IP_CT_TCP_FLAG_##FLAG) ? CT_DPIF_TCPF_##FLAG : 0; CT_DPIF_TCP_FLAGS #undef CT_DPIF_STATUS_FLAG return ret; +#endif } static bool |