refresh = hint;
}
+void interface_update_prefix_delegation(struct interface_ip_settings *ip)
+{
+ struct device_prefix *prefix;
+
+ vlist_for_each_element(&ip->prefix, prefix, node) {
+ interface_update_prefix_assignments(prefix, !ip->no_delegation);
+
+ if (ip->no_delegation) {
+ if (prefix->head.next)
+ list_del(&prefix->head);
+ } else
+ list_add(&prefix->head, &prefixes);
+ }
+}
static void
interface_update_prefix(struct vlist_tree *tree,
struct in6_addr *excl_addr, uint8_t excl_length, const char *pclass);
void interface_ip_set_ula_prefix(const char *prefix);
void interface_refresh_assignments(bool hint);
+void interface_update_prefix_delegation(struct interface_ip_settings *ip);
#endif
interface_change_config(struct interface *if_old, struct interface *if_new)
{
struct blob_attr *old_config = if_old->config;
- bool reload = false, reload_ip = false;
+ bool reload = false, reload_ip = false, update_prefix_delegation = false;
#define FIELD_CHANGED_STR(field) \
((!!if_old->field != !!if_new->field) || \
if_old->force_link = if_new->force_link;
if_old->dns_metric = if_new->dns_metric;
+ if (if_old->proto_ip.no_delegation != if_new->proto_ip.no_delegation) {
+ if_old->proto_ip.no_delegation = if_new->proto_ip.no_delegation;
+ update_prefix_delegation = true;
+ }
+
if_old->proto_ip.no_dns = if_new->proto_ip.no_dns;
interface_replace_dns(&if_old->config_ip, &if_new->config_ip);
interface_ip_set_enabled(&if_old->config_ip, config_ip_enabled);
}
+ if (update_prefix_delegation)
+ interface_update_prefix_delegation(&if_old->proto_ip);
+
interface_write_resolv_conf();
if (if_old->main_dev.dev)
interface_check_state(if_old);