netns: selective flush of rt_cache
[safe/jmp/linux-2.6] / net / ipv4 / icmp.c
index fee171e..aa7cf46 100644 (file)
@@ -3,8 +3,6 @@
  *
  *             Alan Cox, <alan@redhat.com>
  *
- *     Version: $Id: icmp.c,v 1.85 2002/02/01 22:01:03 davem Exp $
- *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
  *     as published by the Free Software Foundation; either version
@@ -691,7 +689,8 @@ static void icmp_unreach(struct sk_buff *skb)
                                               NIPQUAD(iph->daddr));
                        } else {
                                info = ip_rt_frag_needed(net, iph,
-                                                    ntohs(icmph->un.frag.mtu));
+                                                        ntohs(icmph->un.frag.mtu),
+                                                        skb->dev);
                                if (!info)
                                        goto out;
                        }
@@ -847,7 +846,7 @@ static void icmp_echo(struct sk_buff *skb)
  */
 static void icmp_timestamp(struct sk_buff *skb)
 {
-       struct timeval tv;
+       struct timespec tv;
        struct icmp_bxm icmp_param;
        /*
         *      Too short.
@@ -858,9 +857,9 @@ static void icmp_timestamp(struct sk_buff *skb)
        /*
         *      Fill in the current time as ms since midnight UT:
         */
-       do_gettimeofday(&tv);
-       icmp_param.data.times[1] = htonl((tv.tv_sec % 86400) * 1000 +
-                                        tv.tv_usec / 1000);
+       getnstimeofday(&tv);
+       icmp_param.data.times[1] = htonl((tv.tv_sec % 86400) * MSEC_PER_SEC +
+                                        tv.tv_nsec / NSEC_PER_MSEC);
        icmp_param.data.times[2] = icmp_param.data.times[1];
        if (skb_copy_bits(skb, 0, &icmp_param.data.times[0], 4))
                BUG();