OSDN Git Service

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)
commitd5db21a3e6977dcb42cee3d16cd69901fa66510a
tree02531f421723d9954ab3a3013e44e864890c6449
parent755bbc1c0071c6ac6e893e6aaf79728728758b3e
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