: Fix MTU calculation for non-ESP SAs
Subsystems (3)
[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.
---
commit b31d763b8a6b9a6eba5b5805f81ae605ebeab475
tree 6beec3612b419286bf9d7c7b98551ee30172da01
parent 188e1f81ba31af1b65a2f3611df4c670b092bbac
author Patrick McHardy <[email protected]> Mon, 18 Jun 2007 17:57:09 +0200 committer Patrick McHardy <[email protected]> Mon, 18 Jun 2007 17:57:09 +0200
net/xfrm/xfrm_state.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/xfrm/xfrm_state.c +1 -1
@@ -1729,7 +1729,7 @@ int xfrm_state_mtu(struct xfrm_state *x, int mtu) x->type && x->type->get_mtu) res = x->type->get_mtu (x, mtu); else - res = mtu; + res = mtu - x->props.header_len;spin_unlock_bh (&x->lock);return res; }
David Miller
maintainerFrom: Patrick McHardy <[email protected]>
Date: Mon, 18 Jun 2007 18:09:11 +0200
Quoted 9 lines
[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_lenneeds to be subtracted from the MTU if the transform doesn't provide a ->get_mtu() function.Reported-and-tested-by Marco Berizzi <[email protected]>Signed-off-by Patrick McHardy <[email protected]>
Patch applied, thanks a lot Patrick.
We only need this for 2.6.22 right?
Quoted 6 lines · David Miller
From: Patrick McHardy <[email protected]>
Date: Mon, 18 Jun 2007 18:09:11 +0200Quoted 2 lines
[XFRM]: Fix MTU calculation for non-ESP SAs
Quoted 8 lines
Quoted 4 lines
My IPsec MTU optimization patch introduced a regression in MTU calculation for non-ESP SAs, the SA's
header_lenneeds to be subtracted from the MTU if the transform doesn't provide a ->get_mtu() function.Patch applied, thanks a lot Patrick.
We only need this for 2.6.22 right?
Yes, the patch that broke this went into the first 2.6.22-rc.