mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
network: route: check validity of interface name in MultiPathRoute=
This commit is contained in:
parent
8ed87c4983
commit
70a2d9dd31
@ -2757,6 +2757,12 @@ int config_parse_multipath_route(
|
|||||||
if (r > 0)
|
if (r > 0)
|
||||||
m->ifindex = r;
|
m->ifindex = r;
|
||||||
else {
|
else {
|
||||||
|
if (!ifname_valid_full(dev, IFNAME_VALID_ALTERNATIVE)) {
|
||||||
|
log_syntax(unit, LOG_WARNING, filename, line, 0,
|
||||||
|
"Invalid interface name '%s' in %s=, ignoring: %s", dev, lvalue, rvalue);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
m->ifname = strdup(dev);
|
m->ifname = strdup(dev);
|
||||||
if (!m->ifname)
|
if (!m->ifname)
|
||||||
return log_oom();
|
return log_oom();
|
||||||
|
Loading…
Reference in New Issue
Block a user