NetworkManager does not merge dhclient config correctly

Bug #1770762 reported by ts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
New
Undecided
Unassigned

Bug Description

Adding a lease section to a dhclient config file does not work, the closing bracket is not merged into the generated config file, leading to a broken config file. Is this a bug?

More specific: Trying to add a static fallback IP in case DHCP does not work. I added into /etc/dhcp/dhclient.conf:
lease {
  interface "eno2";
  fixed-address 10.0.0.100;
  option subnet-mask 255.0.0.0;
  option routers 10.0.1.1;
  option domain-name-servers 10.0.1.1;
  renew 2 2025/1/12 00:00:01;
  rebind 2 2025/1/12 00:00:01;
  expire 2 2025/1/12 00:00:01;
}

In the resulting merged config file for the eno2-interface /var/lib/NetworkManager/dhclient-eno2.conf, the closing "}" is missing, so the file is broken. Running dhclient manually does work.

------------------------------
Ubuntu release: 18.04
Package version: network-manager 1.10.6-2ubuntu1

ts (tsdz)
no longer affects: ubuntu
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.