* [PATCH] xfrm: fix fragmentation on inter family tunnels
@ 2009-04-06 13:58 Steffen Klassert
2009-04-07 0:43 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Steffen Klassert @ 2009-04-06 13:58 UTC (permalink / raw)
To: David Miller, Herbert Xu; +Cc: netdev
If an ipv4 packet (not locally generated with IP_DF flag not set) bigger
than mtu size is supposed to go via a xfrm ipv6 tunnel, the packetsize
check in xfrm4_tunnel_check_size() is omited and ipv6 drops the packet
without sending a notice to the original sender of the ipv4 packet.
Another issue is that ipv4 connection tracking does reassembling of
incomming fragmented packets. If such a reassembled packet is supposed to
go via a xfrm ipv6 tunnel it will be droped, even if the original sender
did proper fragmentation.
According to RFC 2473 (section 7) tunnel ipv6 packets resulting from the
encapsulation of an original packet are considered as locally generated
packets. If such a packet passed the checks in xfrm{4,6}_tunnel_check_size()
fragmentation is allowed according to RFC 2473 (section 7.1/7.2).
This patch sets skb->local_df in xfrm6_prepare_output() to achieve
fragmentation in this case.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/ipv6/xfrm6_output.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c
index 0af823c..5ee5a03 100644
--- a/net/ipv6/xfrm6_output.c
+++ b/net/ipv6/xfrm6_output.c
@@ -72,6 +72,7 @@ int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb)
#endif
skb->protocol = htons(ETH_P_IPV6);
+ skb->local_df = 1;
return x->outer_mode->output2(x, skb);
}
--
1.5.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfrm: fix fragmentation on inter family tunnels
2009-04-06 13:58 [PATCH] xfrm: fix fragmentation on inter family tunnels Steffen Klassert
@ 2009-04-07 0:43 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-04-07 0:43 UTC (permalink / raw)
To: steffen.klassert; +Cc: herbert, netdev
From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Mon, 6 Apr 2009 15:58:50 +0200
> If an ipv4 packet (not locally generated with IP_DF flag not set) bigger
> than mtu size is supposed to go via a xfrm ipv6 tunnel, the packetsize
> check in xfrm4_tunnel_check_size() is omited and ipv6 drops the packet
> without sending a notice to the original sender of the ipv4 packet.
>
> Another issue is that ipv4 connection tracking does reassembling of
> incomming fragmented packets. If such a reassembled packet is supposed to
> go via a xfrm ipv6 tunnel it will be droped, even if the original sender
> did proper fragmentation.
>
> According to RFC 2473 (section 7) tunnel ipv6 packets resulting from the
> encapsulation of an original packet are considered as locally generated
> packets. If such a packet passed the checks in xfrm{4,6}_tunnel_check_size()
> fragmentation is allowed according to RFC 2473 (section 7.1/7.2).
>
> This patch sets skb->local_df in xfrm6_prepare_output() to achieve
> fragmentation in this case.
>
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Applied, thanks Steffen.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-07 0:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-06 13:58 [PATCH] xfrm: fix fragmentation on inter family tunnels Steffen Klassert
2009-04-07 0:43 ` 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).