netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][IPSEC][6/7] inter address family ipsec tunnel
@ 2006-11-24  5:39 Kazunori MIYAZAWA
  2006-12-01  1:05 ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Kazunori MIYAZAWA @ 2006-11-24  5:39 UTC (permalink / raw)
  To: Miika Komu, Diego Beltrami, Herbert Xu, David Miller; +Cc: netdev, usagi-core

This patch fixes mtu calculation of IPv4

ip_append_data should refer the mtu of "dst" not "path".
if "dst" is stacked, "path" is the actual dst_entry in
the routing table.
therefore the mtu of "path" equals link mtu which is
depends on the device so that it ignores the header length
and the trailer length
"dst" has mtu for creating packet.

Signed-off-by: Miika Komu <miika@iki.fi>
Signed-off-by: Diego Beltrami <Diego.Beltrami@hiit.fi>
Signed-off-by: Kazunori Miyazawa <miyazawa@linux-ipv6.org>

---
 net/ipv4/ip_output.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 1da3d32..f324449 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -806,7 +806,7 @@ int ip_append_data(struct sock *sk,
 			inet->cork.addr = ipc->addr;
 		}
 		dst_hold(&rt->u.dst);
-		inet->cork.fragsize = mtu = dst_mtu(rt->u.dst.path);
+		inet->cork.fragsize = mtu = dst_mtu(&rt->u.dst);
 		inet->cork.rt = rt;
 		inet->cork.length = 0;
 		sk->sk_sndmsg_page = NULL;

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-12-04  6:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-24  5:39 [PATCH][IPSEC][6/7] inter address family ipsec tunnel Kazunori MIYAZAWA
2006-12-01  1:05 ` David Miller
2006-12-01  5:07   ` Kazunori MIYAZAWA
2006-12-04  1:58     ` David Miller
2006-12-04  2:28       ` David Miller
2006-12-04  2:50         ` Kazunori MIYAZAWA
2006-12-04  3:12           ` David Miller
2006-12-04  3:30             ` Herbert Xu
2006-12-04  4:26             ` (usagi-core 31727) " Kazunori MIYAZAWA
2006-12-04  6:33               ` David Miller

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).