From 251a83ec4663ba5e5466df6330c741c2739b00dc Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 31 Jan 2013 16:38:48 +0100 Subject: [PATCH] Fix RS attempts --- src/ra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ra.c b/src/ra.c index 602191a..597de58 100644 --- a/src/ra.c +++ b/src/ra.c @@ -21,7 +21,7 @@ static int sock = -1, rtnl_sock = -1; static unsigned if_index = 0; static char if_name[IF_NAMESIZE] = {0}; -static volatile int rs_attempt = 1; +static volatile int rs_attempt = 0; static struct in6_addr lladdr = IN6ADDR_ANY_INIT; static void ra_send_rs(int signal __attribute__((unused))); @@ -97,7 +97,7 @@ static void ra_send_rs(int signal __attribute__((unused))) const struct sockaddr_in6 dest = {AF_INET6, 0, 0, ALL_IPV6_ROUTERS, if_index}; sendto(sock, &rs, sizeof(rs), MSG_DONTWAIT, (struct sockaddr*)&dest, sizeof(dest)); - if (++rs_attempt < 3) + if (++rs_attempt <= 3) alarm(4); } -- 2.39.2