diff options
| author | Vincent Bernat <[email protected]> | 2017-04-02 09:00:06 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2017-04-04 01:50:42 +0000 |
| commit | f1fb08f6337ca9e3af371a7994b91a5786ba93f9 (patch) | |
| tree | 6f29210ada9f8eba31891e915fafde68fb677ae0 /lib/memory-notifier-error-inject.c | |
| parent | sctp: add SCTP_PR_STREAM_STATUS sockopt for prsctp (diff) | |
| download | kernel-f1fb08f6337ca9e3af371a7994b91a5786ba93f9.tar.gz kernel-f1fb08f6337ca9e3af371a7994b91a5786ba93f9.zip | |
vxlan: fix ND proxy when skb doesn't have transport header offset
When an incoming frame is tagged or when GRO is disabled, the skb
handled to vxlan_xmit() doesn't contain a valid transport header
offset. This makes ND proxying fail.
We combine two changes: replace use of skb_transport_offset() and ensure
the necessary amount of skb is linear just before using it:
- In vxlan_xmit(), when determining if we have an ICMPv6 neighbor
discovery packet, just check if it is an ICMPv6 packet and rely on
neigh_reduce() to do more checks if this is the case. The use of
pskb_may_pull() is replaced by skb_header_pointer() for just the IPv6
header.
- In neigh_reduce(), add pskb_may_pull() for IPv6 header and neighbor
discovery message since this was removed from vxlan_xmit(). Replace
skb_transport_header() with ipv6_hdr() + 1.
- In vxlan_na_create(), replace first skb_transport_offset() with
ipv6_hdr() + 1 and second with skb_network_offset() + sizeof(struct
ipv6hdr). Additionally, ensure we pskb_may_pull() the whole skb as we
need it to iterate over the options.
Signed-off-by: Vincent Bernat <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions
