mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
util: make virMacAddrParse more versatile
Previously the MAC address text was required to be terminated with a NULL. After this, it can be terminated with a space or any control character.
This commit is contained in:
parent
606a013395
commit
30b07a425d
@ -169,7 +169,7 @@ virMacAddrParse(const char* str, virMacAddrPtr addr)
|
||||
|
||||
addr->addr[i] = (unsigned char) result;
|
||||
|
||||
if ((i == 5) && (*end_ptr == '\0'))
|
||||
if ((i == 5) && (*end_ptr <= ' '))
|
||||
return 0;
|
||||
if (*end_ptr != ':')
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user