ehea: Access iph->tot_len with correct endianness
[firefly-linux-kernel-4.4.55.git] / drivers / net / ehea / ehea_main.c
index 49ba6a9a7b06116e4fea8adf02108cd7a07986c4..0920b796bd78375b17c679861a30e50338c9c3c7 100644 (file)
@@ -623,7 +623,7 @@ static int get_skb_hdr(struct sk_buff *skb, void **iphdr,
        *tcph = tcp_hdr(skb);
 
        /* check if ip header and tcp header are complete */
-       if (iph->tot_len < ip_len + tcp_hdrlen(skb))
+       if (ntohs(iph->tot_len) < ip_len + tcp_hdrlen(skb))
                return -1;
 
        *hdr_flags = LRO_IPV4 | LRO_TCP;