Merge tag 'platform-drivers-x86-v4.6-1' of git://git.infradead.org/users/dvhart/linux...
[deliverable/linux.git] / net / ipv4 / icmp.c
index 36e26977c9088c1dbd09cd13e9a5e2c43369fe31..6333489771ed07bb2509500a2e48fed05643281a 100644 (file)
@@ -931,7 +931,6 @@ static bool icmp_echo(struct sk_buff *skb)
  */
 static bool icmp_timestamp(struct sk_buff *skb)
 {
-       struct timespec tv;
        struct icmp_bxm icmp_param;
        /*
         *      Too short.
@@ -942,9 +941,7 @@ static bool icmp_timestamp(struct sk_buff *skb)
        /*
         *      Fill in the current time as ms since midnight UT:
         */
-       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[1] = inet_current_timestamp();
        icmp_param.data.times[2] = icmp_param.data.times[1];
        if (skb_copy_bits(skb, 0, &icmp_param.data.times[0], 4))
                BUG();
This page took 0.039425 seconds and 5 git commands to generate.