> [High] erspan_calc_hlen() sets tun_hlen=8 for every ERSPAN v1/v2 > tunnel, which assumes a GRE sequence word is always emitted.
Fixed: erspan_xmit() sets IP_TUNNEL_SEQ_BIT for v1/v2, like erspan_fb_xmit() and ip6erspan_tunnel_xmit().
> [High] A failed erspan_changelink() now leaves the tunnel with a header > length for the new version but o_flags from the old configuration.
Fixed: recompute only on success; on error restore ver/index/dir/hwid and hlen, so a rejected change leaves the device unchanged.
> [High] erspan_changelink() updates the fields the transmit path depends > on as separate plain stores, holding only RTNL.
Partly. The window predates this change, and SEQ now comes from ver, so "new ver + old flags without SEQ" is gone. The v1->v0 case still needs the length derived in xmit, which touches every __gre_xmit() caller; left out of this fix.
> [Medium] The commit message says the patch mirrors the IPv6 side, but > the IPv4 and IPv6 changelinks now behave differently ...
Added NLA_POLICY_MAX(NLA_U8, 2) so an out-of-range version is rejected before any state is written. Kept IPv4 parse-in-place rather than restructuring erspan_netlink_parms().
> [Low] The new dev->needed_headroom += hlen; ... is a plain read-modify-write
Fixed: READ_ONCE()/WRITE_ONCE(), clamped at 0. pw-bot: cr