From 3e52a1448eee0fbf7ff67c123265bedcbc9c26d0 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sat, 27 Sep 2014 18:54:43 +0200 Subject: [PATCH] Send RS alternatingly with and without source MAC --- src/ra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ra.c b/src/ra.c index b700c9a..baaee9b 100644 --- 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 -- 2.30.2