device: enable support for ipv6.dhcp-timeout

System Internals / NetworkManager - Thomas Haller [redhat.com] - 11 September 2017 09:05 EDT

- cleanup data type and use guint32 consistently. We might want to introduce a new "infinity" value. But since libnm's NM_SETTING_IP_CONFIG_DHCP_TIMEOUT asserts against the range 0 - G_MAXINT32, we cannot express it as -1 anyway. So, infinity will have the numerical value G_MAXINT32, hence guint32 is just fine.

- make use of existing ipv6.dhcp-timeout setting and add global default configuration in NetworkManager.conf

- instead of having subclasses call nm_device_set_dhcp_timeout(), add a virtual function get_dhcp_timeout().

1aa36dd device: enable support for ipv6.dhcp-timeout
man/NetworkManager.conf.xml | 5 +++
src/devices/nm-device-private.h | 1 -
src/devices/nm-device.c | 82 +++++++++++++++++++---------------
src/devices/nm-device.h | 3 ++
src/devices/wifi/nm-device-olpc-mesh.c | 11 +++--
src/devices/wwan/nm-device-modem.c | 24 +++++-----
src/dhcp/nm-dhcp-client.c | 9 ++--
src/dhcp/nm-dhcp-client.h | 2 +
src/dhcp/nm-dhcp-manager.c | 4 +-
src/nm-iface-helper.c | 2 +-
10 files changed, 81 insertions(+), 62 deletions(-)

Upstream: cgit.freedesktop.org


  • Share