summaryrefslogtreecommitdiffstats
path: root/avahi-autoipd
diff options
context:
space:
mode:
authorNathaniel McCallum <nathaniel@natemccallum.com>2010-06-25 21:18:14 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-25 21:18:14 +0200
commitc5ef344e39fd7e169a31e2353ba09a8870768502 (patch)
tree2c78ffce02324068b3af4ef28c45bff2159c6416 /avahi-autoipd
parent27172e415a0b77465018e5cff6d980dc3265fc95 (diff)
autoipd: don't consider packets with out own MAC as source as conflicting. See #265
Diffstat (limited to 'avahi-autoipd')
-rw-r--r--avahi-autoipd/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/avahi-autoipd/main.c b/avahi-autoipd/main.c
index 380ab94..edf2cd1 100644
--- a/avahi-autoipd/main.c
+++ b/avahi-autoipd/main.c
@@ -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);