dhcpcd5 "10 second defence" takes zero time

Bug #1939443 reported by Matthew Exon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

dhcpcd5 version 1:8.1.2-1+rpt1
Raspberry Pi OS buster

I have two routers/wifi access points, with one providing a DHCP service and the other bridging its wifi network so that all hosts can talk to each other. I have several Raspberry Pis, each of which may connect via ethernet, or either wifi network, or some combination. Because the raspberry pi antenna is very weak and the environment is noisy, they very frequently drop packets, lose signal, and reconnect.

I'm finding that frequently (up to tens of times per day per host) the pis come to believe that their IP address has been "claimed" by another host. In fact the MAC address is that of the bridging router. I believe they are seeing their own ARP messages re-broadcast (possibly delayed) by the bridging router, and misreading that as coming from the router itself.

But never mind that, this bug report is about this:

    Aug 9 19:40:01 localhost dhcpcd[486]: wlan0: hardware address XX:XX:XX:XX:XX:XX claims 192.168.2.165
    Aug 9 19:40:01 localhost dhcpcd[486]: wlan0: defended address 192.168.2.165
    Aug 9 19:40:01 localhost dhcpcd[486]: wlan0: hardware address XX:XX:XX:XX:XX:XX claims 192.168.2.165
    Aug 9 19:40:01 localhost dhcpcd[486]: wlan0: 10 second defence failed for 192.168.2.165
    Aug 9 19:40:01 localhost dhcpcd[486]: wlan0: deleting IP address 192.168.2.165/24

There are no previous messages from dhcpcd for minutes beforehand. The intention seems to be that dhcpcd notices another host using its address, attempts to "defend" it with an ARP message, then waits 10s for the defence to be confirmed. But in fact you can see it gives up immediately.

Looking at the upstream repo, I *think* this bug may have been fixed in version 8.1.3:

    commit ae46ddb6423ac5e4c81ce3f935cf2e681f25c1e2 (dhcpcd-8.1.2-142-gae46ddb6)
    Author: Roy Marples <email address hidden>
    Date: Wed Jan 22 16:32:09 2020 +0000

        ARP: Fix defend time check

However, I haven't been able to build from sources to check <https://bugs.launchpad.net/raspbian/+bug/1939441>.

Revision history for this message
Matthew Exon (ubuntubugs-mexon) wrote :

This bug should be closed. It was due to a misunderstanding on my part.

The "10 second defence" means that if two conflicting ARP packets from another host arrive within 10 seconds, then the lease should be abandoned. In my case the two packets are arriving immediately. I previously misread this behaviour as sending a defence, and expecting that "defence" to last 10 seconds.

I still have weird problems with my network, so I will keep looking for another solution.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.