Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
datapath: ip6_gre: Fix ip6erspan hlen calculation
commit 2d665034f239412927b1e71329f20f001c92da09 Author: Petr Machata <[email protected]> Date: Thu May 17 16:36:51 2018 +0200 net: ip6_gre: Fix ip6erspan hlen calculation Even though ip6erspan_tap_init() sets up hlen and tun_hlen according to what ERSPAN needs, it goes ahead to call ip6gre_tnl_link_config() which overwrites these settings with GRE-specific ones. Similarly for changelink callbacks, which are handled by ip6gre_changelink() calls ip6gre_tnl_change() calls ip6gre_tnl_link_config() as well. The difference ends up being 12 vs. 20 bytes, and this is generally not a problem, because a 12-byte request likely ends up allocating more and the extra 8 bytes are thus available. However correct it is not. So replace the newlink and changelink callbacks with an ERSPAN-specific ones, reusing the newly-introduced _common() functions. Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support") Signed-off-by: Petr Machata <[email protected]> Acked-by: William Tu <[email protected]> Signed-off-by: David S. Miller <[email protected]> Cc: Greg Rose <[email protected]> Signed-off-by: William Tu <[email protected]> Signed-off-by: Ben Pfaff <[email protected]> Reviewed-by: Greg Rose <[email protected]> Tested-by: Greg Rose <[email protected]>
- Loading branch information