Source-Changes-HG archive

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

[src/trunk]: src the address expire counter is just a time difference; it can...



details:   https://anonhg.NetBSD.org/src/rev/b754e1bd7d50
branches:  trunk
changeset: 781161:b754e1bd7d50
user:      drochner <drochner%NetBSD.org@localhost>
date:      Thu Aug 23 12:06:32 2012 +0000

description:
the address expire counter is just a time difference; it can turn
negative after the timer expired until the entry is deleted.
make it signed, so that we don't get output like
"00:1b:78:12:50:46 wm0 18446744073709551349 flags=0<>"

diffstat:

 sbin/brconfig/brconfig.c |  6 +++---
 sys/net/if_bridgevar.h   |  4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 1c182bf0734b -r b754e1bd7d50 sbin/brconfig/brconfig.c
--- a/sbin/brconfig/brconfig.c  Thu Aug 23 11:59:02 2012 +0000
+++ b/sbin/brconfig/brconfig.c  Thu Aug 23 12:06:32 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: brconfig.c,v 1.13 2011/08/29 14:29:21 joerg Exp $      */
+/*     $NetBSD: brconfig.c,v 1.14 2012/08/23 12:06:32 drochner Exp $   */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -43,7 +43,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: brconfig.c,v 1.13 2011/08/29 14:29:21 joerg Exp $");
+__RCSID("$NetBSD: brconfig.c,v 1.14 2012/08/23 12:06:32 drochner Exp $");
 #endif
 
 
@@ -485,7 +485,7 @@
                ifba = ifbac.ifbac_req + i;
                memcpy(ea.ether_addr_octet, ifba->ifba_dst,
                    sizeof(ea.ether_addr_octet));
-               printf("%s%s %s %lu ", prefix, ether_ntoa(&ea),
+               printf("%s%s %s %ld ", prefix, ether_ntoa(&ea),
                    ifba->ifba_ifsname, ifba->ifba_expire);
                printb("flags", ifba->ifba_flags, IFBAFBITS);
                printf("\n");
diff -r 1c182bf0734b -r b754e1bd7d50 sys/net/if_bridgevar.h
--- a/sys/net/if_bridgevar.h    Thu Aug 23 11:59:02 2012 +0000
+++ b/sys/net/if_bridgevar.h    Thu Aug 23 12:06:32 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bridgevar.h,v 1.14 2009/04/04 10:00:23 bouyer Exp $ */
+/*     $NetBSD: if_bridgevar.h,v 1.15 2012/08/23 12:06:32 drochner Exp $       */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -162,7 +162,7 @@
 struct ifbareq {
        char            ifba_ifsname[IFNAMSIZ]; /* member if name */
        /*XXX: time_t */
-       unsigned long   ifba_expire;            /* address expire time */
+       long            ifba_expire;            /* address expire time */
        uint8_t         ifba_flags;             /* address flags */
        uint8_t         ifba_dst[ETHER_ADDR_LEN];/* destination address */
 };



Home | Main Index | Thread Index | Old Index