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 == '_';
|
*q == '_';
|
||||||
|
|
||||||
if (!good) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue