* [XFRM]: Fix MTU calculation for non-ESP SAs
@ 2007-06-18 16:09 Patrick McHardy
2007-06-19 5:31 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Patrick McHardy @ 2007-06-18 16:09 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Netdev List, Marco Berizzi
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1131 bytes --]
[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>
---
commit b31d763b8a6b9a6eba5b5805f81ae605ebeab475
tree 6beec3612b419286bf9d7c7b98551ee30172da01
parent 188e1f81ba31af1b65a2f3611df4c670b092bbac
author Patrick McHardy <kaber@trash.net> Mon, 18 Jun 2007 17:57:09 +0200
committer Patrick McHardy <kaber@trash.net> Mon, 18 Jun 2007 17:57:09 +0200
net/xfrm/xfrm_state.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 85f3f43..dfacb9c 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [XFRM]: Fix MTU calculation for non-ESP SAs
2007-06-18 16:09 [XFRM]: Fix MTU calculation for non-ESP SAs Patrick McHardy
@ 2007-06-19 5:31 ` David Miller
2007-06-19 12:02 ` Patrick McHardy
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2007-06-19 5:31 UTC (permalink / raw)
To: kaber; +Cc: netdev, pupilla
From: Patrick McHardy <kaber@trash.net>
Date: Mon, 18 Jun 2007 18:09:11 +0200
> [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>
Patch applied, thanks a lot Patrick.
We only need this for 2.6.22 right?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [XFRM]: Fix MTU calculation for non-ESP SAs
2007-06-19 5:31 ` David Miller
@ 2007-06-19 12:02 ` Patrick McHardy
0 siblings, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2007-06-19 12:02 UTC (permalink / raw)
To: David Miller; +Cc: netdev, pupilla
David Miller wrote:
> From: Patrick McHardy <kaber@trash.net>
> Date: Mon, 18 Jun 2007 18:09:11 +0200
>
>
>>[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.
>>
>
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-19 12:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-18 16:09 [XFRM]: Fix MTU calculation for non-ESP SAs Patrick McHardy
2007-06-19 5:31 ` David Miller
2007-06-19 12:02 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).