X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fipv4%2Ficmp.c;h=26a1405477c5424e3e5669227ee7b4d784926c5f;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=58ad168d56229eb1534429527db6f9e7e32e4c35;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 58ad168d5..26a140547 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -64,6 +64,7 @@ * */ +#include #include #include #include @@ -729,6 +730,7 @@ out_err: static void icmp_redirect(struct sk_buff *skb) { struct iphdr *iph; + unsigned long ip; if (skb->len < sizeof(struct iphdr)) goto out_err; @@ -740,6 +742,7 @@ static void icmp_redirect(struct sk_buff *skb) goto out; iph = (struct iphdr *)skb->data; + ip = iph->daddr; switch (skb->h.icmph->code & 7) { case ICMP_REDIR_NET: @@ -749,8 +752,7 @@ static void icmp_redirect(struct sk_buff *skb) */ case ICMP_REDIR_HOST: case ICMP_REDIR_HOSTTOS: - ip_rt_redirect(skb->nh.iph->saddr, iph->daddr, - skb->h.icmph->un.gateway, + ip_rt_redirect(skb->nh.iph->saddr, ip, skb->h.icmph->un.gateway, iph->saddr, skb->dev); break; }