Thanks! I applied this on master and branch-2.10.

Alin.

> -----Mesaj original-----
> De la: [email protected] <ovs-dev-
> [email protected]> În numele Anand Kumar
> Trimis: Thursday, September 20, 2018 5:30 AM
> Către: Alin Gabriel Serdean <[email protected]>; [email protected]
> Subiect: Re: [ovs-dev] [PATCH] datapath-windows: Fix payload length
> calculation in Conntrack.h
> 
> Hi Alin,
> 
> Thanks for fixing this,
> Acked-by: Anand Kumar <[email protected]>
> 
> Regards,
> Anand Kumar
> 
> On 9/19/18, 3:37 PM, "[email protected] on behalf of Alin
> Gabriel Serdean" <[email protected] on behalf of
> [email protected]> wrote:
> 
>     The payload calculation in OvsGetTcpHeader is wrong:
>     `ntohs(ipHdr->tot_len) - expr` instead of `ntohs((ipHdr->tot_len) -
expr)`.
> 
>     We already have a macro for that calculation defined in NetProto.h so
use
> it.
> 
>     Signed-off-by: Alin Gabriel Serdean <[email protected]>
>     ---
>      datapath-windows/ovsext/Conntrack.h | 3 +--
>      1 file changed, 1 insertion(+), 2 deletions(-)
> 
>     diff --git a/datapath-windows/ovsext/Conntrack.h b/datapath-
> windows/ovsext/Conntrack.h
>     index d4152b33a..044fb436c 100644
>     --- a/datapath-windows/ovsext/Conntrack.h
>     +++ b/datapath-windows/ovsext/Conntrack.h
>     @@ -175,8 +175,7 @@ OvsGetTcpHeader(PNET_BUFFER_LIST nbl,
>          tcp = (TCPHdr *)((PCHAR)ipHdr + ipHdr->ihl * 4);
>          if (tcp->doff * 4 >= sizeof *tcp) {
>              NdisMoveMemory(dest, tcp, sizeof(TCPHdr));
>     -        *tcpPayloadLen = ntohs((ipHdr->tot_len) - (ipHdr->ihl * 4) -
>     -                               (TCP_HDR_LEN(tcp)));
>     +        *tcpPayloadLen = TCP_DATA_LENGTH(ipHdr, tcp);
>              return storage;
>          }
> 
>     --
>     2.16.1.windows.1
> 
>     _______________________________________________
>     dev mailing list
>     [email protected]
> 
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.o
> penvswitch.org%2Fmailman%2Flistinfo%2Fovs-
> dev&amp;data=02%7C01%7Ckumaranand%40vmware.com%7C30dc4304c493
> 4da3166a08d61e807a8f%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0
> %7C636729934502072772&amp;sdata=FWmdwckcC%2B5ymgR0Ryt8iBU0YHA
> c6%2BRFPoFz2w66vlc%3D&amp;reserved=0
> 
> 
> 
> 
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to