]> git.decadent.org.uk Git - odhcp6c.git/commitdiff
Send RS alternatingly with and without source MAC
authorSteven Barth <steven@midlink.org>
Sat, 27 Sep 2014 16:54:43 +0000 (18:54 +0200)
committerSteven Barth <steven@midlink.org>
Sat, 27 Sep 2014 16:54:43 +0000 (18:54 +0200)
src/ra.c

index b700c9a8270a10aba5a162f10d0c4c061e785e27..baaee9bcb6c410d21edf2368a7aeda9989f209f5 100644 (file)
--- a/src/ra.c
+++ b/src/ra.c
@@ -146,7 +146,7 @@ static void ra_send_rs(int signal __attribute__((unused)))
        struct ifreq ifr;
        memset(&ifr, 0, sizeof(ifr));
        strncpy(ifr.ifr_name, if_name, sizeof(ifr.ifr_name));
-       if (!ioctl(sock, SIOCGIFHWADDR, &ifr)
+       if ((rs_attempt % 2 == 0) && !ioctl(sock, SIOCGIFHWADDR, &ifr)
                        && memcmp(rs.lladdr.data, ifr.ifr_hwaddr.sa_data, 6))
                memcpy(rs.lladdr.data, ifr.ifr_hwaddr.sa_data, 6);
        else