Skip to content

network: set routes to DNS servers provided by DHCP - #13070

Merged
keszybz merged 5 commits into
systemd:masterfrom
yuwata:network-set-route-to-dhcp-dns
Jul 19, 2019
Merged

keszybz merged 5 commits into
systemd:masterfrom
yuwata:network-set-route-to-dhcp-dns

Conversation

@yuwata

@yuwata yuwata commented Jul 16, 2019 •

Copy link
Copy Markdown
Member

Closes #11961.

Currently, only DNS servers provided by DHCPv4 are supported. If this is accepted, then I will do that for DHCPv6 in later PR.

@poettering poettering left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this, this is excellent!

Comment thread src/network/networkd-dhcp4.c Resolved
@yuwata
yuwata force-pushed the network-set-route-to-dhcp-dns branch 2 times, most recently from d9b444c to f5629b0 Compare July 16, 2019 18:11
@yuwata

yuwata commented Jul 16, 2019

Copy link
Copy Markdown
Member Author

@poettering Thank you for the review. I force-pushed a revised version. PTAL.

@yuwata
yuwata force-pushed the network-set-route-to-dhcp-dns branch from f5629b0 to 1771406 Compare July 16, 2019 22:02

@keszybz keszybz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice. Some refactoring suggestions below.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's painful... Could we maybe adjust the clock?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, #11883 will help this. But, I'd like to do that in a later PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.

Comment thread src/network/networkd-dhcp4.c Resolved
Comment thread src/network/networkd-route.c Resolved
Comment thread src/network/networkd-dhcp4.c Resolved
Comment thread src/network/networkd-dhcp4.c Resolved
Comment thread man/systemd.network.xml Resolved
@yuwata
yuwata force-pushed the network-set-route-to-dhcp-dns branch from 1771406 to 9a118f3 Compare July 17, 2019 17:29
@yuwata

yuwata commented Jul 17, 2019 •

Copy link
Copy Markdown
Member Author

@keszybz Thank you for the review. I've force-pushed a revised version. In the revised version, the two suggestions (hash_ops and helper func) by @keszybz are addressed. PTAL.

@yuwata
yuwata force-pushed the network-set-route-to-dhcp-dns branch from 9a118f3 to f805ca6 Compare July 18, 2019 12:49
@yuwata

yuwata commented Jul 18, 2019

Copy link
Copy Markdown
Member Author

Hmm, setting SetRoutesToDNS=yes by default seems to break Ubuntu CIs.

@yuwata
yuwata force-pushed the network-set-route-to-dhcp-dns branch from f805ca6 to 195a18c Compare July 18, 2019 16:56
@yuwata

yuwata commented Jul 18, 2019

Copy link
Copy Markdown
Member Author

Updated. Now the setting is disabled by default.

@yuwata

yuwata commented Jul 19, 2019

Copy link
Copy Markdown
Member Author

Now all CIs are green. PTAL.

@keszybz keszybz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's merge.

Comment thread man/systemd.network.xml
<listitem>
<para>When true, the routes to the DNS servers received from the DHCP server will be
configured. When <varname>UseDNS=</varname> is disabled, this setting is ignored.
Defaults to <literal>false</literal></para>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing ".".

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in merge.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch. Thanks.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.

@keszybz
keszybz merged commit 195a18c into systemd:master Jul 19, 2019
@yuwata
yuwata deleted the network-set-route-to-dhcp-dns branch July 19, 2019 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

networkd: synthesize explicit per-ip routes from DHCP lease DNS data

3 participants