Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / net / ipv4 / icmp.c
index 58ad168..26a1405 100644 (file)
@@ -64,6 +64,7 @@
  *
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/jiffies.h>
@@ -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;
        }