diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2009-04-05 23:58:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-06 20:07:59 -0400 |
commit | d1d88e5de491f7b0862a0adaed427211c0e4a0a6 (patch) | |
tree | 4706cb6a58d60c9061203f788e074c531fb5362d /net | |
parent | 10fd9d7ec48194754de6497ded2ef53cbd2c313e (diff) |
xfrm: fix fragmentation on inter family tunnels
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | 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 0af823cf7f1f..5ee5a031bc93 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) | |||
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | skb->protocol = htons(ETH_P_IPV6); | 74 | skb->protocol = htons(ETH_P_IPV6); |
75 | skb->local_df = 1; | ||
75 | 76 | ||
76 | return x->outer_mode->output2(x, skb); | 77 | return x->outer_mode->output2(x, skb); |
77 | } | 78 | } |