core: introduce parse_ip_port (#4825)
1. Listed in TODO. 2. Tree wide replace safe_atou16 with parse_ip_port incase it's used for ports.
This commit is contained in:
committed by
Lennart Poettering
parent
5efdbf11d1
commit
10452f7c93
@@ -252,8 +252,8 @@ int config_parse_destination_port(const char *unit,
|
||||
assert(rvalue);
|
||||
assert(data);
|
||||
|
||||
r = safe_atou16(rvalue, &port);
|
||||
if (r < 0 || port <= 0) {
|
||||
r = parse_ip_port(rvalue, &port);
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse VXLAN destination port '%s'.", rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user