summaryrefslogtreecommitdiff
path: root/net/ipv4/xfrm4_output.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-07-15 20:11:34 -0600
committerGrant Likely <grant.likely@secretlab.ca>2011-07-15 20:11:34 -0600
commit8c11642a50555e584774737f7c296f9aece310cf (patch)
tree1ff8dfaf05479593ef2c50378a68dfc6aec495a5 /net/ipv4/xfrm4_output.c
parent5d10302f46df1d9a85c34ea97f9b6c29e414482e (diff)
parent620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc (diff)
Merge commit 'v3.0-rc7' into devicetree/next
Diffstat (limited to 'net/ipv4/xfrm4_output.c')
-rw-r--r--net/ipv4/xfrm4_output.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c
index 2d51840e53a..327a617d594 100644
--- a/net/ipv4/xfrm4_output.c
+++ b/net/ipv4/xfrm4_output.c
@@ -32,7 +32,12 @@ static int xfrm4_tunnel_check_size(struct sk_buff *skb)
dst = skb_dst(skb);
mtu = dst_mtu(dst);
if (skb->len > mtu) {
- icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));
+ if (skb->sk)
+ ip_local_error(skb->sk, EMSGSIZE, ip_hdr(skb)->daddr,
+ inet_sk(skb->sk)->inet_dport, mtu);
+ else
+ icmp_send(skb, ICMP_DEST_UNREACH,
+ ICMP_FRAG_NEEDED, htonl(mtu));
ret = -EMSGSIZE;
}
out: