core: use defines for sysfs values of bridge attributes (group-address and vlan-protocol)

This commit is contained in:
Thomas Haller 2020-08-21 13:50:21 +02:00
parent 58847f85a4
commit a3d57721e6
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -172,14 +172,14 @@ to_sysfs_group_address_sys (const char *group_address, NMEtherAddr *out_addr)
static void
from_sysfs_group_address (const char *value, GValue *out)
{
if (!nm_utils_hwaddr_matches (value, -1, "01:80:C2:00:00:00", -1))
if (!nm_utils_hwaddr_matches (value, -1, NM_BRIDGE_GROUP_ADDRESS_DEF_STR, -1))
g_value_set_string (out, value);
}
static const char *
to_sysfs_group_address (GValue *value)
{
return g_value_get_string (value) ?: "01:80:C2:00:00:00";
return g_value_get_string (value) ?: NM_BRIDGE_GROUP_ADDRESS_DEF_STR;
}
static int
@ -188,7 +188,7 @@ to_sysfs_vlan_protocol_sys (const char *value)
if (nm_streq0 (value, "802.1ad"))
return ETH_P_8021AD;
return 0x8100;
return ETH_P_8021Q;
}
static void