0

In accordance with man dhcpcd.conf I used the inform option to set a static IP address. Using this option seems to cause my DHCP client dhcpcd to flood my logfile with useless messages. Here is a sample:

# After adding line: `inform 192.168.1.199/24` to `/etc/dhcpcd.conf` on my wifi interface # and rebooting, `journalctl` is showing approx *8 log entries per second*:

$ journalctl -f | grep wlan0 Mar 26 07:15:17 raspberrypi0w dhcpcd[568]: wlan0: received approval for 192.168.1.199 Mar 26 07:15:17 raspberrypi0w dhcpcd[568]: wlan0: received approval for 192.168.1.199 Mar 26 07:15:17 raspberrypi0w dhcpcd[568]: wlan0: received approval for 192.168.1.199 ... ad infinitum at a rate of 4-8 per second

The request option (similar to inform) exhibits no such behavior. Before choosing my static IP, I reviewed the settings of the DHCP server for my network: I verified that my chosen IP address was not an active lease. I even took the additional (but unnecessary) step of choosing an IP address that was outside the available range/pool of dynamic addresses configured on my DHCP server.

My system is bullseye, and dhcpcd version is 8.1.2. buster uses the same version of dhcpcd, and exhibits the same behavior. And same behavior for wired (eth0) and wireless (wlan0) interfaces.

What is the problem, and how do I fix this?

Seamus
  • 21,900
  • 3
  • 33
  • 70
  • Have you tried https://github.com/NetworkConfiguration/dhcpcd ? Ray Marples was very helpful but contracted cancer and passed the task on. – Milliways Apr 17 '22 at 07:47
  • @Milliways: Yes, I did - note Roy's comment, "But this doesn't really help downstreams to update dhcpcd :(". More details here ICYI. And yeah - I only learned of his cancer earlier today - it was a shock. – Seamus Apr 17 '22 at 08:00

1 Answers1

3

You have found a bug. This bug has a history. I won't go into the details here; you can read the following posts if you're interested: Feb 18, 2020, Aug 16, 2021, Mar 30, 2022, April 4, 2022.

I gather from the exchange on April 4, 2022, that Raspberry Pi has no established channel for submitting pull/merge requests to the dhcpcd sources they maintain. But I feel sure that I'm not sure the information passed on to the RPi organization in that post will eventually yield an upgrade through the apt process. In either case, I've posted a "recipe" for downloading, "patching" and building dhcpcd without this annoying little bug.

FWIW, I've tested it on 3 of my systems (2 bullseye & 1 buster). It certainly eliminates the logging issues, and I've noticed no other side effects. Also, the coding change strikes me as a simple one, but you may make your own judgments on that point.

Seamus
  • 21,900
  • 3
  • 33
  • 70
  • 1
    According to Seamus' comments in https://raspberrypi.stackexchange.com/questions/137443/dhcpcd-conf-inform-vs-static-ip-vs-request-how-should-you-really-setup-a-static, this bug should have been fixed in recent Raspbians. – keshlam Oct 02 '22 at 21:44