diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-09-15 04:00:07 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-12 09:51:21 (GMT) |
commit | e814bae39ad562608361b851ae79cc7edcc35bf7 (patch) | |
tree | 936c4929d861efaac5b00be702a542eda67e5006 /drivers/net/usb/qmi_wwan.c | |
parent | f0a5af78b530ab5616d6fcde79d28ad57ecaea3e (diff) | |
download | linux-e814bae39ad562608361b851ae79cc7edcc35bf7.tar.xz |
ip6_gre: skb_push ipv6hdr before packing the header in ip6gre_header
[ Upstream commit 76cc0d3282d4b933fa144fa41fbc5318e0fdca24 ]
Now in ip6gre_header before packing the ipv6 header, it skb_push t->hlen
which only includes encap_hlen + tun_hlen. It means greh and inner header
would be over written by ipv6 stuff and ipv6h might have no chance to set
up.
Jianlin found this issue when using remote any on ip6_gre, the packets he
captured on gre dev are truncated:
22:50:26.210866 Out ethertype IPv6 (0x86dd), length 120: truncated-ip6 -\
8128 bytes missing!(flowlabel 0x92f40, hlim 0, next-header Options (0) \
payload length: 8192) ::1:2000:0 > ::1:0:86dd: HBH [trunc] ip-proto-128 \
8184
It should also skb_push ipv6hdr so that ipv6h points to the right position
to set ipv6 stuff up.
This patch is to skb_push hlen + sizeof(*ipv6h) and also fix some indents
in ip6gre_header.
Fixes: c12b395a4664 ("gre: Support GRE over IPv6")
Reported-by: Jianlin Shi <jishi@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/usb/qmi_wwan.c')
0 files changed, 0 insertions, 0 deletions