Opened 7 years ago

Closed 5 years ago

Last modified 4 years ago

#13385 closed bug (fixed)

First DHCP lookup times out when to connecting to WIFI

Reported by: tqh Owned by: nobody
Priority: normal Milestone: R1/beta2
Component: Servers/net_server Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

When connecting to wifi, first DHCP lookup fails. As its timeout is four seconds, it takes a long time to connect.

Not sure why it fails, probably fails to send first packets. I made a patch to DHCP which timeouts after a few mS and it connects four seconds faster.

Attachments (2)

dhcp_test.patch (1.1 KB ) - added by tqh 7 years ago.
Very short initial timeout
dhcp.patch (5.1 KB ) - added by tqh 7 years ago.
Updated with header

Download all attachments as: .zip

Change History (15)

by tqh, 7 years ago

Attachment: dhcp_test.patch added

Very short initial timeout

comment:1 by tqh, 7 years ago

patch: 01

comment:2 by tqh, 7 years ago

Patch should not be applied as is, only to show how it was tested.

comment:3 by diver, 7 years ago

Component: - GeneralServers/net_server
Owner: changed from nobody to axeld

comment:4 by axeld, 7 years ago

Would be nice to find the cause of the first failure, but there is little that speaks against using a more aggressive retry interval here. It's used to reduce the load of the server when many clients going through a DHCP negotiation at once -- since current hardware is much more capable, and since this happens quite rarely anyway, I'm all for a shorter cycle.

comment:5 by tqh, 7 years ago

Yes, not sure how to track the failure down easily though. If anyone can check if it also fails on first try on cable (I don't have hardware) we'd have some more clues.

comment:6 by tqh, 7 years ago

Proposing these changes to dhcp-client, I changed the max comparison to a min one as it just seemed wrong to me.

by tqh, 7 years ago

Attachment: dhcp.patch added

Updated with header

comment:7 by tqh, 7 years ago

We are getting 'Operation timed out' but bytes received are not < 0 here: http://cgit.haiku-os.org/haiku/tree/src/servers/net/DHCPClient.cpp#n683

So no if case is taken.

comment:8 by tqh, 7 years ago

Oh, errno is not updated on success.

comment:9 by tqh, 7 years ago

DHCP timeouts changed in hrev51039.

comment:10 by tqh, 7 years ago

patch: 10

comment:11 by axeld, 7 years ago

Owner: changed from axeld to nobody
Status: newassigned

comment:12 by waddlesplash, 5 years ago

Resolution: fixed
Status: assignedclosed

Remaining issues tracked in #14307.

comment:13 by nielx, 4 years ago

Milestone: UnscheduledR1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.