Hi,

ndp uses an int expire_time for time calculations.  This should be
time_t.

The routing messages and IPv6 prefixes and default router also have
wrong expire time type.  But this has to wait until ABI unlock.

ok?

bluhm


Index: usr.sbin/ndp/ndp.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/ndp/ndp.c,v
retrieving revision 1.47
diff -u -p -u -p -r1.47 ndp.c
--- usr.sbin/ndp/ndp.c  21 Mar 2013 04:43:17 -0000      1.47
+++ usr.sbin/ndp/ndp.c  18 Jul 2013 22:49:26 -0000
@@ -335,7 +335,8 @@ getsocket(void)
 struct sockaddr_in6 so_mask = {sizeof(so_mask), AF_INET6 };
 struct sockaddr_in6 blank_sin = {sizeof(blank_sin), AF_INET6 }, sin_m;
 struct sockaddr_dl blank_sdl = {sizeof(blank_sdl), AF_LINK }, sdl_m;
-int    expire_time, flags, found_entry;
+time_t expire_time;
+int    flags, found_entry;
 struct {
        struct  rt_msghdr m_rtm;
        char    m_space[512];
@@ -379,7 +380,8 @@ set(int argc, char **argv)
        ea = (u_char *)LLADDR(&sdl_m);
        if (ndp_ether_aton(eaddr, ea) == 0)
                sdl_m.sdl_alen = 6;
-       flags = expire_time = 0;
+       expire_time = 0;
+       flags = 0;
        while (argc-- > 0) {
                if (strncmp(argv[0], "temp", 4) == 0) {
                        struct timeval time;

Reply via email to