Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/net Pull up following revision(s) (requested by msait...



details:   https://anonhg.NetBSD.org/src/rev/466863eaf11f
branches:  netbsd-6
changeset: 775464:466863eaf11f
user:      riz <riz%NetBSD.org@localhost>
date:      Mon Nov 19 20:04:22 2012 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #669):
        sys/net/if.c: revision 1.261
Fix a bug that SIOCZIFDATA clears if_lastchage by zero.
Update if_lastchange with getnanotime().

diffstat:

 sys/net/if.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r bb2627da4e76 -r 466863eaf11f sys/net/if.c
--- a/sys/net/if.c      Mon Nov 19 20:01:08 2012 +0000
+++ b/sys/net/if.c      Mon Nov 19 20:04:22 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.c,v 1.260 2012/02/03 03:35:30 christos Exp $        */
+/*     $NetBSD: if.c,v 1.260.2.1 2012/11/19 20:04:22 riz Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.260 2012/02/03 03:35:30 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.260.2.1 2012/11/19 20:04:22 riz Exp $");
 
 #include "opt_inet.h"
 
@@ -1614,6 +1614,14 @@
                 */
                memset(&ifp->if_data.ifi_ipackets, 0, sizeof(ifp->if_data) -
                    offsetof(struct if_data, ifi_ipackets));
+               /*
+                * The memset() clears to the bottm of if_data. In the area,
+                * if_lastchange is included. Please be careful if new entry
+                * will be added into if_data or rewite this.
+                *
+                * And also, update if_lastchnage.
+                */
+               getnanotime(&ifp->if_lastchange);
                break;
        case SIOCSIFMTU:
                ifr = data;



Home | Main Index | Thread Index | Old Index