aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/route.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index a5da63e5faa2..0206789bc2b7 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1186,8 +1186,16 @@ static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie)
1186static void ipv4_link_failure(struct sk_buff *skb) 1186static void ipv4_link_failure(struct sk_buff *skb)
1187{ 1187{
1188 struct rtable *rt; 1188 struct rtable *rt;
1189 struct ip_options opt;
1189 1190
1190 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0); 1191 /* Recompile ip options since IPCB may not be valid anymore.
1192 */
1193 memset(&opt, 0, sizeof(opt));
1194 opt.optlen = ip_hdr(skb)->ihl*4 - sizeof(struct iphdr);
1195 if (__ip_options_compile(dev_net(skb->dev), &opt, skb, NULL))
1196 return;
1197
1198 __icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0, &opt);
1191 1199
1192 rt = skb_rtable(skb); 1200 rt = skb_rtable(skb);
1193 if (rt) 1201 if (rt)