Re: Per-SSID lease file?
Roy Marples
Sun Feb 08 11:55:04 2015
Hi
On 07/02/2015 19:00, Pierre-Hugues Husson wrote:
> I've been searching for some improvements to WiFi connection time on
> Android devices, and especially dhcp.
> First thing I noticed, is that the lease file used is always the same,
> on all APs.
> Which means it is sending a request for an IP it can't possibly have.
> So I did a quick change in dhcp.c in read_lease and write_lease, to have
> per-SSID lease files, and the connection is already a lot faster.
That's a good idea.
We probably want to set the leasefile in dhcp_start() and dhcp6_start().
However, we also want to consider dhcp_dump() and dhcp6_dump() as well -
maybe add code there to read the ssid and apply if needed.
Can you modify your patch for that and submit it?
> I'm seeing there is already the code to retrieve the current SSID, and
> transmit it to hooks, so possibly it's possible without changing source
> code, only with changing hooks ?
> Also, chromium OS fixes this issue by setting the lease file with a
> parameter, and restarting dhcpcd on new request.
I don't think that's a good idea. Once associated, with a carrier, the
SSID can't change so it only needs to be set in the _start functions and
not as a parameter.
> What is your advice on that ?
> Should I implement an option to dhcpcd for that ?
I don't think it needs to be an option.
You could say dhcpcd already has too many options :)
Roy
Archive administrator: postmaster@marples.name