diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-07-20 18:21:12 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-07-20 18:21:12 +0000 |
commit | 5498b6bdcfac28055b0d2e671e644ee5b3a4b7d2 (patch) | |
tree | 063fda0bf5325eecb1d99e08d9ac20af28b8570f | |
parent | 119b8b0c4bb4fd53d1414baf857b823dd733684c (diff) |
arp and rarpd used an int expire_time for time calculation. Convert
this into time_t.
OK benno@
-rw-r--r-- | usr.sbin/arp/arp.c | 9 | ||||
-rw-r--r-- | usr.sbin/rarpd/arptab.c | 6 |
2 files changed, 9 insertions, 6 deletions
diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 56b8390f954..8def2a88c97 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arp.c,v 1.52 2013/03/21 04:43:17 deraadt Exp $ */ +/* $OpenBSD: arp.c,v 1.53 2013/07/20 18:21:11 bluhm Exp $ */ /* $NetBSD: arp.c,v 1.12 1995/04/24 13:25:18 cgd Exp $ */ /* @@ -248,8 +248,8 @@ getsocket(void) struct sockaddr_in so_mask = { 8, 0, 0, { 0xffffffff } }; struct sockaddr_inarp blank_sin = { sizeof(blank_sin), AF_INET }, sin_m; struct sockaddr_dl blank_sdl = { sizeof(blank_sdl), AF_LINK }, sdl_m; -int expire_time, flags, export_only, doing_proxy, - found_entry; +time_t expire_time; +int flags, export_only, doing_proxy, found_entry; struct { struct rt_msghdr m_rtm; char m_space[512]; @@ -282,7 +282,8 @@ set(int argc, char *argv[]) errx(1, "invalid ethernet address: %s", eaddr); memcpy(LLADDR(&sdl_m), ea, sizeof(*ea)); sdl_m.sdl_alen = 6; - doing_proxy = flags = export_only = expire_time = 0; + expire_time = 0; + doing_proxy = flags = export_only = 0; while (argc-- > 0) { if (strncmp(argv[0], "temp", 4) == 0) { struct timeval time; diff --git a/usr.sbin/rarpd/arptab.c b/usr.sbin/rarpd/arptab.c index e846bba1a8d..a6073b00507 100644 --- a/usr.sbin/rarpd/arptab.c +++ b/usr.sbin/rarpd/arptab.c @@ -74,7 +74,8 @@ getsocket(void) struct sockaddr_in so_mask = {8, 0, 0, { 0xffffffff}}; struct sockaddr_inarp blank_sin = {sizeof(blank_sin), AF_INET }, sin_m; struct sockaddr_dl blank_sdl = {sizeof(blank_sdl), AF_LINK }, sdl_m; -int expire_time, flags, export_only, doing_proxy; +time_t expire_time; +int flags, export_only, doing_proxy; struct { struct rt_msghdr m_rtm; @@ -104,7 +105,8 @@ arptab_set(u_char *eaddr, u_int32_t host) sin->sin_addr.s_addr = host; memcpy((u_char *)LLADDR(&sdl_m), (char *)eaddr, 6); sdl_m.sdl_alen = 6; - doing_proxy = flags = export_only = expire_time = 0; + expire_time = 0; + doing_proxy = flags = export_only = 0; gettimeofday(&time, 0); expire_time = time.tv_sec + 20 * 60; |