mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 04:48:10 +02:00
device: fix sysctl getter for MTU using guint32 type
The only caller wants to read the MTU, which is more type guint32 then gint32.
This commit is contained in:
parent
2802e823fc
commit
f0cd2403d4
1 changed files with 8 additions and 3 deletions
|
|
@ -643,9 +643,14 @@ nm_device_ipv6_sysctl_set (NMDevice *self, const char *property, const char *val
|
||||||
}
|
}
|
||||||
|
|
||||||
static guint32
|
static guint32
|
||||||
nm_device_ipv6_sysctl_get_int32 (NMDevice *self, const char *property, gint32 fallback)
|
nm_device_ipv6_sysctl_get_uint32 (NMDevice *self, const char *property, guint32 fallback)
|
||||||
{
|
{
|
||||||
return nm_platform_sysctl_get_int32 (NM_PLATFORM_GET, NMP_SYSCTL_PATHID_ABSOLUTE (nm_utils_ip6_property_path (nm_device_get_ip_iface (self), property)), fallback);
|
return nm_platform_sysctl_get_int_checked (NM_PLATFORM_GET,
|
||||||
|
NMP_SYSCTL_PATHID_ABSOLUTE (nm_utils_ip6_property_path (nm_device_get_ip_iface (self), property)),
|
||||||
|
10,
|
||||||
|
0,
|
||||||
|
G_MAXUINT32,
|
||||||
|
fallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
|
@ -6635,7 +6640,7 @@ nm_device_ipv6_set_mtu (NMDevice *self, guint32 mtu)
|
||||||
{
|
{
|
||||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
||||||
guint32 ip_mtu = get_ip_mtu (self);
|
guint32 ip_mtu = get_ip_mtu (self);
|
||||||
guint32 plat_mtu = nm_device_ipv6_sysctl_get_int32 (self, "mtu", ip_mtu);
|
guint32 plat_mtu = nm_device_ipv6_sysctl_get_uint32 (self, "mtu", ip_mtu);
|
||||||
|
|
||||||
priv->ip6_mtu = mtu ?: plat_mtu;
|
priv->ip6_mtu = mtu ?: plat_mtu;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue