libnm: add flag to map zero to NULL in _nm_utils_ipaddr_canonical_or_invalid()
This seems a questionable thing to do, and should be made clearer by having a parameter (that makes you think about what is happening here). Also, the normalization for vxlan.remote does not perform this mapping, so the parameter is there so that the approach can handle both flavors.
This commit is contained in:
@@ -44,7 +44,8 @@ void _nm_utils_bytes_from_dbus(GVariant *dbus_value, GValue *prop_value);
|
||||
|
||||
char *_nm_utils_hwaddr_canonical_or_invalid(const char *mac, gssize length);
|
||||
|
||||
char *_nm_utils_ipaddr_canonical_or_invalid(int addr_family, const char *ip);
|
||||
char *
|
||||
_nm_utils_ipaddr_canonical_or_invalid(int addr_family, const char *ip, gboolean map_zero_to_null);
|
||||
|
||||
gboolean _nm_utils_hwaddr_link_local_valid(const char *mac);
|
||||
|
||||
|
Reference in New Issue
Block a user