network/address: make Label= accept an empty string

We usually reset setting when an emptry string is specified.
This commit is contained in:
Yu Watanabe
2023-07-31 18:15:26 +09:00
parent c5874748a4
commit b8e898a681
+6
View File
@@ -1895,6 +1895,12 @@ int config_parse_label(
return 0;
}
if (isempty(rvalue)) {
n->label = mfree(n->label);
TAKE_PTR(n);
return 0;
}
if (!address_label_valid(rvalue)) {
log_syntax(unit, LOG_WARNING, filename, line, 0,
"Interface label is too long or invalid, ignoring assignment: %s", rvalue);