}
if (reload_ip) {
+ bool config_ip_enabled = if_old->config_ip.enabled;
+ bool proto_ip_enabled = if_old->proto_ip.enabled;
+
interface_ip_set_enabled(&if_old->config_ip, false);
interface_ip_set_enabled(&if_old->proto_ip, false);
- interface_ip_set_enabled(&if_old->proto_ip, if_new->proto_ip.enabled);
- interface_ip_set_enabled(&if_old->config_ip, if_new->config_ip.enabled);
+ interface_ip_set_enabled(&if_old->proto_ip, proto_ip_enabled);
+ interface_ip_set_enabled(&if_old->config_ip, config_ip_enabled);
}
interface_write_resolv_conf();