[XFRM]: Fix MTU calculation for non-ESP SAs

My IPsec MTU optimization patch introduced a regression in MTU calculation
for non-ESP SAs, the SA's header_len needs to be subtracted from the MTU if
the transform doesn't provide a ->get_mtu() function.

Reported-and-tested-by: Marco Berizzi <pupilla@hotmail.com>

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Patrick McHardy and committed by David S. Miller 28121617 fa490cfd

+1 -1
+1 -1
net/xfrm/xfrm_state.c
··· 1729 1729 x->type && x->type->get_mtu) 1730 1730 res = x->type->get_mtu(x, mtu); 1731 1731 else 1732 - res = mtu; 1732 + res = mtu - x->props.header_len; 1733 1733 spin_unlock_bh(&x->lock); 1734 1734 return res; 1735 1735 }