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

(#1663365) networkd: respect DHCP UseRoutes option #270

Merged
merged 3 commits into from Feb 7, 2019

Conversation

Projects
None yet
6 participants
@jsynacek
Copy link
Collaborator

jsynacek commented Jan 15, 2019

No description provided.

@jsynacek jsynacek force-pushed the jsynacek:bz1663365-dhcp-useroutes branch from ed396c5 to 3267fcf Jan 17, 2019

ssahani and others added some commits Apr 21, 2016

networkd: respect DHCP UseRoutes option
This fixes #2282.

(cherry picked from commit 964b26f)

Resolves: #1663365
networkd: dont crash when mtu changes (#6594)
Prevent networkd from crashing when UseMTU is used. Many drivers will
bring the link down and then back up to configure a new MTU. Networkd
will also asynchonously send rtnl messages to configure the link and may
receive responses after the link has gone down and come back up (which
networkd will handle and set the lease and network to NULL.

This changes the behavior to instead return if this is the case instead
of crashing via assert.

(cherry picked from commit 0c9b15a)

Related: #1663365
networkd: fix dhcp4 link without routes not being considered ready (#…
…8728)

The dhcp4 code sets link->dhcp4_configured when dhcp4_route_handler()
has processed the last message.

However, in case UseRoutes=no has been set in the [DHCP] section, or
in case the DHCP server simply sends no routes, link_set_dhcp_routes()
will not send any netlink messages and dhcp4_route_handler() will
therefore never be called.

This causes the link to never reach LINK_STATE_CONFIGURED, and e.g.
systemd-networkd-wait-online will not consider the link as ready.

Fix that by setting link->dhcp4_configured = true and calling
link_check_ready() in dhcp4_address_handler() in case
link_set_dhcp_routes() sent no netlink messages (dhcp4_messages is
zero).

(cherry picked from commit 223932c)

Related: #1663365

[jsynacek: Note that link_client_handler() was used instead of
link_check_ready(). The former is an older version of the latter.]

@jsynacek jsynacek force-pushed the jsynacek:bz1663365-dhcp-useroutes branch from 3267fcf to 3f2c100 Jan 29, 2019

@lnykryn lnykryn added needs-acks and removed needs-acks labels Feb 2, 2019

@dtardon dtardon added merge-ready and removed needs-review labels Feb 7, 2019

@dtardon

This comment has been minimized.

Copy link
Collaborator

dtardon commented Feb 7, 2019

LGTM

@lnykryn lnykryn added the needs-review label Feb 7, 2019

@dtardon dtardon self-assigned this Feb 7, 2019

@dtardon dtardon removed the needs-review label Feb 7, 2019

@dtardon dtardon removed their assignment Feb 7, 2019

@dtardon dtardon self-requested a review Feb 7, 2019

@dtardon

dtardon approved these changes Feb 7, 2019

@lnykryn lnykryn merged commit 583aea0 into lnykryn:staging Feb 7, 2019

2 checks passed

CentOS CI Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment