Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing address update on dhcp restart #168

Merged
merged 2 commits into from
Dec 20, 2019

Conversation

fhunleth
Copy link
Member

If the DHCP client was restarted (for any reason), it first reports that
the network interface should be deconfigured and then reports the new
(likely the same) lease. This works. However, the deconfig/renew ends up
clearing multicast registrations on the IP address being deconfig/renew'd.
This broke mDNS since it was listening on the IP address.

To fix this, code is added to clear out all IPv4 addresses on deconfig.
This propogates the "glitch" in IP network connectivity throughout and as
soon as it could possibly happen. When the IP address comes back via the
renew, mdns_lite will register a listener and all will work.

It should be noted that the GenServer crash that caused this bug to happen
has been fixed. One way of reproducing is to back out
bc8073a5d694de3da1cd3169cb1002fc9ea9015f.

@fhunleth fhunleth force-pushed the clear-addresses-on-dhcp-deconfig branch 2 times, most recently from c723e67 to 3b4637d Compare December 20, 2019 15:17
If the DHCP client was restarted (for any reason), it first reports that
the network interface should be deconfigured and then reports the new
(likely the same) lease. This works. However, the deconfig/renew ends up
clearing multicast registrations on the IP address being
deconfig/renew'd. This broke mDNS since it was listening on the IP
address.

To fix this, code is added to clear out all IPv4 addresses on deconfig.
This propogates the "glitch" in IP network connectivity throughout and
as soon as it could possibly happen. When the IP address comes back via
the renew, `mdns_lite` will register a listener and all will work.

It should be noted that the GenServer crash that caused this bug to
happen has been fixed. One way of reproducing is to back out
bc8073a5d694de3da1cd3169cb1002fc9ea9015f.
@fhunleth fhunleth merged commit 59b7287 into master Dec 20, 2019
@fhunleth fhunleth deleted the clear-addresses-on-dhcp-deconfig branch December 20, 2019 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants