forked from NetworkConfiguration/dhcpcd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dhcpcd sending wrong message when RENEWING/REBINDING
When RENEWING/REBINDING, the DHCP client should send messages with ciaddr set and requested-ip unset. However when dhcpcd 10 is configured with --noconfigure, the messages sent are the opposite: ciaddr unset and requested-ip set - these messages are for INIT-REBOOT, not RENEWING or REBINDING. The reason for it is that when --noconfigure is enabled, dhcpcd won't setup the state->addr property of the interface when the lease is bound. When dhcpcd renews or rebinds the lease later, it needs state->addr to be set to correctly configure ciaddr and requested-ip. Since state->addr is NULL, dhcpcd sends wrong messages (for the detail see github.com/NetworkConfiguration/issues/355). This patch fixes this by also setting up state->addr with ipv4_applyaddr() when --noconfigure is enabled. Note that this function also configure the IPv4 address and build routes in the system, so we need to disable these in the function. Change-Id: I94bfffd95b62066995bd436d3b8bf185eafda398
- Loading branch information
Showing
3 changed files
with
17 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters