Hi all.

I noticed that my debian wireless clients never get a DHCPOFFER from
their first DHCPDISCOVER, and looking at the log shows why:

journalctl output (very much shortened/redacted):

09:34:30 sudo[4373]: COMMAND=/usr/sbin/ifup wlp4s0
09:34:30 wpa_supplicant[4384]: Successfully initialized wpa_supplicant
09:34:30 dhclient[4395]: Internet Systems Consortium DHCP Client 4.4.1
09:34:30 dhclient[4395]: Copyright 2004-2018 Internet Systems Consortium.
09:34:30 dhclient[4395]: All rights reserved.
09:34:30 dhclient[4395]: For info, please visit https://www.isc.org/...
09:34:30 dhclient[4395]:
09:34:30 dhclient[4395]: Listening on LPF/wlp4s0/ab:cd:ab:cd:ab:cd
09:34:30 dhclient[4395]: Sending on   LPF/wlp4s0/ab:cd:ab:cd:ab:cd
09:34:30 dhclient[4395]: Sending on   Socket/fallback
09:34:30 dhclient[4395]: DHCPDISCOVER on wlp4s0 to 255.255.255.255...
09:34:31 kernel: wlp4s0: authenticate with 12:34:12:34:12:34
09:34:31 wpa_supplicant[4385]: wlp4s0: SME: Trying to authenticate...
09:34:31 kernel: wlp4s0: send auth to 12:34:12:34:12:34 (try 1/3)
09:34:31 kernel: wlp4s0: authenticated
09:34:31 wpa_supplicant[4385]: wlp4s0: Trying to associate with ...
09:34:31 kernel: wlp4s0: associate with 12:34:12:34:12:34 (try 1/3)
09:34:31 kernel: wlp4s0: RX AssocResp from 12:34:12:34:12:34...
09:34:31 kernel: wlp4s0: associated
09:34:31 wpa_supplicant[4385]: wlp4s0: Associated with 12:34:12:34:12:34
09:34:31 wpa_supplicant[4385]: wlp4s0: CTRL-EVENT-SUBNET-STATUS-UPDATE...
09:34:31 wpa_supplicant[4385]: wlp4s0: WPA: Key negotiation completed...
09:34:31 wpa_supplicant[4385]: wlp4s0: CTRL-EVENT-CONNECTED...
09:34:34 dhclient[4395]: DHCPDISCOVER on wlp4s0 to 255.255.255.255...
09:34:34 dhclient[4395]: DHCPOFFER of 192.168.0.6 from 192.168.0.1
09:34:34 dhclient[4395]: DHCPREQUEST for 192.168.0.6 on wlp4s0...
09:34:34 dhclient[4395]: DHCPACK of 192.168.0.6 from 192.168.0.1

So it's clear that dhclient is sending out the first DHCPDISCOVER
*before* wpa_supplicant has authenticated/associated/connected to the
AP.

Given that this is guaranteed to fail, isn't it worth "not doing"? Is
there anyway that I can get dhclient to wait for a successful
connection *before* sending out any DHCPDISCOVERs? (In the wired
world, it doesn't make sense to issue a DHCPDISCOVER before plugging
the cable in.)

(FWIW, I sent this same question to debian-user 18 months ago, but I
didn't get anywhere so I thought I'd try again here).

TIA, Jaime

Reply via email to