summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
82b4c9d)
Explicitly keep track of whether the current interface config was set by
an IPMI network override, and avoid overwriting any saved config unless
the override was marked persistent.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
+ ifconf->override = true;
pb_log("Applying IPMI network interface override\n");
/* Replace any existing interface config */
pb_log("Applying IPMI network interface override\n");
/* Replace any existing interface config */
unsigned int i;
char *val;
unsigned int i;
char *val;
+ /*
+ * Don't store IPMI overrides to NVRAM. If this was a persistent
+ * override it was already stored in NVRAM by
+ * get_ipmi_network_override()
+ */
+ if (config->network.n_interfaces &&
+ config->network.interfaces[0]->override)
+ return;
+
val = talloc_strdup(platform, "");
for (i = 0; i < config->network.n_interfaces; i++) {
val = talloc_strdup(platform, "");
for (i = 0; i < config->network.n_interfaces; i++) {
talloc_strdup(dest, src->static_config.url);
break;
}
talloc_strdup(dest, src->static_config.url);
break;
}
+ dest->override = src->override;
len += 4 + optional_strlen(conf->static_config.url);
}
len += 4 + optional_strlen(conf->static_config.url);
}
+ len += 4 /* conf->override */;
+
conf->static_config.url);
}
conf->static_config.url);
}
+ *(uint32_t *)pos = conf->override;
+ pos += 4;
+
+ if (read_u32(buf, len, &tmp))
+ return -1;
+ iface->override = !!tmp;
+
char *url;
} static_config;
};
char *url;
} static_config;
};
};
struct network_config {
};
struct network_config {