Looks good but for a comment. Acked-by: Nithin Raju <nit...@vmware.com>
>On 6/24/16, 6:14 PM, "Sairam Venugopal" <vsai...@vmware.com> wrote: > >>Update the code to use tcp->flags. This keeps the kernel conntrack-tcp.c >>file in sync with userspace version. >> >>This patch also addresses an warning - 'Comparison of a boolean >>expression with an integer other than 0 or 1' - (tcp_flags & >>(TCP_ACK|TCP_RST)) == (TCP_ACK|TCP_RST)) >> >>Signed-off-by: Sairam Venugopal <vsai...@vmware.com> >>@@ -232,31 +226,33 @@ OvsConntrackUpdateTcpEntry(OVS_CT_ENTRY* conn_, >> /* The peer that should receive 'pkt' */ >> struct tcp_peer *dst = &conn->peer[reply ? 0 : 1]; >> uint8_t sws = 0, dws = 0; >>+ UINT16 tcp_flags = tcp->flags; >> uint16_t win = ntohs(tcp->window); >> uint32_t ack, end, seq, orig_seq; >> uint32_t p_len = OvsGetTcpPayloadLength(nbl); >> int ackskew; >> >>- if (OvsConntrackValidateTcpFlags(tcp)) { >>+ if (OvsCtInvalidTcpFlags(tcp->flags)) { >> return CT_UPDATE_INVALID; >> } >> >>- if ((tcp->syn) && dst->state >= CT_DPIF_TCPS_FIN_WAIT_2 && >>- src->state >= CT_DPIF_TCPS_FIN_WAIT_2) { >>+ if (((tcp_flags & (TCP_SYN|TCP_ACK)) == TCP_SYN) Why do we need to include TCP_ACK in the check? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev