Commit 4a787c27 by 0x0916

confile: supporting new net hwaddr key in network_new_hwaddrs

Signed-off-by: 's avatar0x0916 <w@laoqinren.net>
parent ce4be612
...@@ -2606,7 +2606,6 @@ bool network_new_hwaddrs(struct lxc_conf *conf) ...@@ -2606,7 +2606,6 @@ bool network_new_hwaddrs(struct lxc_conf *conf)
{ {
char *lend, *p, *p2; char *lend, *p, *p2;
struct lxc_list *it; struct lxc_list *it;
const char *key = "lxc.network.hwaddr";
char *lstart = conf->unexpanded_config; char *lstart = conf->unexpanded_config;
if (!conf->unexpanded_config) if (!conf->unexpanded_config)
...@@ -2621,12 +2620,12 @@ bool network_new_hwaddrs(struct lxc_conf *conf) ...@@ -2621,12 +2620,12 @@ bool network_new_hwaddrs(struct lxc_conf *conf)
else else
lend++; lend++;
if (strncmp(lstart, key, strlen(key)) != 0) { if (!lxc_config_net_hwaddr(lstart)) {
lstart = lend; lstart = lend;
continue; continue;
} }
p = strchr(lstart + strlen(key), '='); p = strchr(lstart, '=');
if (!p) { if (!p) {
lstart = lend; lstart = lend;
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment