Comment 8 for bug 1759014

Revision history for this message
Alan Johnson (awj) wrote :

The patch in #7 would fix some use cases while breaking others. For example, the current behavior is ALSO a legitimate way to configure a network, and would be broken by that patch.

The issue here is that using DHCP shouldn't be an all or nothing switch. I would propose the following behavior.

1. If "dhcp4: yes" or "dhcp4: no" is specified, use the current behavior.

2. Also accept dhcp4 as a dictionary. For example:

  dhcp4:
    use_dns: no
    use_ntp: yes
    use_routes: no
    listen_port: 1234

In this scenario the [DHCP] section of the systemd.network config will be populated with the specified values.

Of course all of the above should apply to dhcp6 as well.