]> git.baikalelectronics.ru Git - kernel.git/commit
erspan: auto detect truncated ipv6 packets.
authorWilliam Tu <u9012063@gmail.com>
Fri, 11 May 2018 12:49:47 +0000 (05:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 May 2018 20:03:49 +0000 (16:03 -0400)
commit0c5e1bb756cac4a5852c424f1a3b0b314acfd8ba
tree02531f421723d9954ab3a3013e44e864890c6449
parent572a32c5653dc8a9eb2f036e7e999976144e9c01
erspan: auto detect truncated ipv6 packets.

Currently the truncated bit is set only when 1) the mirrored packet
is larger than mtu and 2) the ipv4 packet tot_len is larger than
the actual skb->len.  This patch adds another case for detecting
whether ipv6 packet is truncated or not, by checking the ipv6 header
payload_len and the skb->len.

Reported-by: Xiaoyan Jin <xiaoyanj@vmware.com>
Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c
net/ipv6/ip6_gre.c