net: ethernet: IPv6 packet length should be relevantly handled
It's much different than IPv4 where it's possible to find the whole packet length. Here it has to count also the ipv6 header size by itself. Jira: ZEP-1422 Change-Id: I84b1602ac75ef81b9ceda7898ca9dedf2e54d633 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
a79f9bcbc4
commit
ff5954890a
|
@ -75,7 +75,8 @@ static inline void ethernet_update_length(struct net_if *iface,
|
|||
NET_IPV4_BUF(buf)->len[1]);
|
||||
} else {
|
||||
len = ((NET_IPV6_BUF(buf)->len[0] << 8) +
|
||||
NET_IPV6_BUF(buf)->len[1]);
|
||||
NET_IPV6_BUF(buf)->len[1]) +
|
||||
NET_IPV6H_LEN;
|
||||
}
|
||||
|
||||
if (len < NET_ETH_MINIMAL_FRAME_SIZE - sizeof(struct net_eth_hdr)) {
|
||||
|
|
Loading…
Reference in a new issue