]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile.
authorRoy Marples <roy@marples.name>
Sat, 3 May 2014 21:18:20 +0000 (21:18 +0000)
committerRoy Marples <roy@marples.name>
Sat, 3 May 2014 21:18:20 +0000 (21:18 +0000)
ipv6nd.c

index fade521a082ebbfe7057d6a5f2c36d4dabf1d953..d4e52250857b569d0979de308bfac7dc74fdea81 100644 (file)
--- a/ipv6nd.c
+++ b/ipv6nd.c
@@ -1494,12 +1494,11 @@ ipv6nd_handledata(void *arg)
            icp->icmp6_type, icp->icmp6_code, ctx->sfrom);
 }
 
-static int
+static void
 ipv6nd_startrs1(void *arg)
 {
        struct interface *ifp = arg;
        struct rs_state *state;
-       struct timeval tv;
 
        syslog(LOG_INFO, "%s: soliciting an IPv6 router", ifp->name);
        if (ipv6nd_open(ifp->ctx) == -1) {
@@ -1507,8 +1506,6 @@ ipv6nd_startrs1(void *arg)
                return;
        }
 
-       eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp);
-
        state = RS_STATE(ifp);
        if (state == NULL) {
                ifp->if_data[IF_DATA_IPV6ND] = calloc(1, sizeof(*state));
@@ -1536,6 +1533,7 @@ ipv6nd_startrs(struct interface *ifp)
 {
        struct timeval tv;
 
+       eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp);
        tv.tv_sec = 0;
        tv.tv_usec = (suseconds_t)(arc4random() %
            (MAX_RTR_SOLICITATION_DELAY * 1000000));