mirror of
https://github.com/systemd/systemd.git
synced 2025-03-14 04:58:28 +03:00
Handle escape characters in interface name
Updated the patch as per review comments.
This commit is contained in:
parent
17f8a21fd0
commit
6ef03f7a0d
@ -92,7 +92,14 @@ bool interface_name_is_valid(const char *p) {
|
||||
*q == '_';
|
||||
|
||||
if (!good) {
|
||||
log_debug("The interface %s is invalid as it contains special character %c", p, *q);
|
||||
if (DEBUG_LOGGING) {
|
||||
_cleanup_free_ char *iface = NULL;
|
||||
iface = cescape(p);
|
||||
if (!iface)
|
||||
log_oom();
|
||||
else
|
||||
log_debug("The interface %s is invalid as it contains special character %c", iface, *q);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user