Skip to content
Commit 02ca0423 authored by Jakub Sitnicki's avatar Jakub Sitnicki Committed by David S. Miller
Browse files

ip6_tunnel: Account for tunnel header in tunnel MTU

With ip6gre we have a tunnel header which also makes the tunnel MTU
smaller. We need to reserve room for it. Previously we were using up
space reserved for the Tunnel Encapsulation Limit option
header (RFC 2473).

Also, after commit b05229f4 ("gre6: Cleanup GREv6 transmit path,
call common GRE functions") our contract with the caller has
changed. Now we check if the packet length exceeds the tunnel MTU after
the tunnel header has been pushed, unlike before.

This is reflected in the check where we look at the packet length minus
the size of the tunnel header, which is already accounted for in tunnel
MTU.

Fixes: b05229f4

 ("gre6: Cleanup GREv6 transmit path, call common GRE functions")
Signed-off-by: default avatarJakub Sitnicki <jkbs@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1666d49e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment