]> git.meshlink.io Git - catta/commitdiff
autoipd: don't consider packets with out own MAC as source as conflicting. See #265
authorNathaniel McCallum <nathaniel@natemccallum.com>
Fri, 25 Jun 2010 19:18:14 +0000 (21:18 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 25 Jun 2010 19:18:14 +0000 (21:18 +0200)
avahi-autoipd/main.c

index 380ab942dfc20be7df8f4f73fec9e550b4bd2f92..edf2cd119817eae3af7c73a2b0c1f8e3f9603dbf 100644 (file)
@@ -1242,9 +1242,14 @@ static int loop(int iface, uint32_t addr) {
                 int conflict = 0;
 
                 if (info.sender_ip_address == addr) {
-                    /* Normal conflict */
-                    conflict = 1;
-                    daemon_log(LOG_INFO, "Received conflicting normal ARP packet.");
+
+                    if (memcmp(hw_address, info.sender_hw_address, ETHER_ADDRLEN)) {
+                        /* Normal conflict */
+                        conflict = 1;
+                        daemon_log(LOG_INFO, "Received conflicting normal ARP packet.");
+                    } else
+                        daemon_log(LOG_DEBUG, "Received ARP packet back on source interface. Ignoring.");
+
                 } else if (state == STATE_WAITING_PROBE || state == STATE_PROBING || state == STATE_WAITING_ANNOUNCE) {
                     /* Probe conflict */
                     conflict = info.target_ip_address == addr && memcmp(hw_address, info.sender_hw_address, ETHER_ADDRLEN);