diff options
author | Thomas Haller <thaller@redhat.com> | 2017-09-11 10:43:48 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-09-11 15:05:57 +0200 |
commit | 1aa36dde94dfb32a7172815ecb918b662aa9253b (patch) | |
tree | c9f45271a22d2591297a7eac8a5f2e9ec8a811f8 /src/dhcp/nm-dhcp-client.h | |
parent | fa46736013fa1e3df1508b1f67b495ce45daf94a (diff) | |
download | NetworkManager-1aa36dde94dfb32a7172815ecb918b662aa9253b.tar.gz |
device: enable support for ipv6.dhcp-timeout
- 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().
Diffstat (limited to 'src/dhcp/nm-dhcp-client.h')
-rw-r--r-- | src/dhcp/nm-dhcp-client.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dhcp/nm-dhcp-client.h b/src/dhcp/nm-dhcp-client.h index 890c5ff595..9e71b1c0e8 100644 --- a/src/dhcp/nm-dhcp-client.h +++ b/src/dhcp/nm-dhcp-client.h @@ -24,6 +24,8 @@ #include "nm-ip4-config.h" #include "nm-ip6-config.h" +#define NM_DHCP_TIMEOUT_DEFAULT ((guint32) 45) /* default DHCP timeout, in seconds */ + #define NM_TYPE_DHCP_CLIENT (nm_dhcp_client_get_type ()) #define NM_DHCP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP_CLIENT, NMDhcpClient)) #define NM_DHCP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP_CLIENT, NMDhcpClientClass)) |