Skip to content

Commit

Permalink
netplan fails to enable network manager connection with a route metri…
Browse files Browse the repository at this point in the history
…c value
  • Loading branch information
calexandru2018 committed Aug 2, 2024
1 parent 427a709 commit a457dd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nm.c
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ write_nm_conf_access_point(const NetplanNetDefinition* def, const char* rootdir,
g_key_file_set_boolean(kf, "ipv4", "never-default", TRUE);
}

if (def->dhcp4 && def->dhcp4_overrides.metric != NETPLAN_METRIC_UNSPEC)
if (def->dhcp4 || def->dhcp4_overrides.metric != NETPLAN_METRIC_UNSPEC)
g_key_file_set_uint64(kf, "ipv4", "route-metric", def->dhcp4_overrides.metric);

if (def->dhcp6 || def->ip6_addresses || def->gateway6 || def->ip6_nameservers || def->ip6_addr_gen_mode) {
Expand Down

0 comments on commit a457dd7

Please sign in to comment.