summaryrefslogtreecommitdiff
path: root/src/dhcp/nm-dhcp-client.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2019-05-21 21:52:44 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2019-07-05 11:04:32 +0200
commit401fee7c2040e87d7f9c83fd350733b0f538d578 (patch)
treea32b72b4f3d3398ea1437790aaf32b10cfb8bfa3 /src/dhcp/nm-dhcp-client.h
parentbe8f7b5a5de6ed18d9e329e0151fd3065747c7b0 (diff)
downloadNetworkManager-401fee7c2040e87d7f9c83fd350733b0f538d578.tar.gz
dhcp: support notifying the client of the result of DAD
The DHCP client is not meant to use the assigned address before DAD has completed successfully, if enabled. And if DAD fails, the server should be notified with a DECLINE, in order to potentially blacklist the address. Currently, none of the clients support this, but add the required callbacks, and allow clients to opt in if they want.
Diffstat (limited to 'src/dhcp/nm-dhcp-client.h')
-rw-r--r--src/dhcp/nm-dhcp-client.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dhcp/nm-dhcp-client.h b/src/dhcp/nm-dhcp-client.h
index 1a8ccaba2b..33030a4f23 100644
--- a/src/dhcp/nm-dhcp-client.h
+++ b/src/dhcp/nm-dhcp-client.h
@@ -82,6 +82,13 @@ typedef struct {
const char *last_ip4_address,
GError **error);
+ gboolean (*accept) (NMDhcpClient *self,
+ GError **error);
+
+ gboolean (*decline) (NMDhcpClient *self,
+ const char *error_message,
+ GError **error);
+
gboolean (*ip6_start) (NMDhcpClient *self,
const char *anycast_addr,
const struct in6_addr *ll_addr,
@@ -155,6 +162,13 @@ gboolean nm_dhcp_client_start_ip6 (NMDhcpClient *self,
guint needed_prefixes,
GError **error);
+gboolean nm_dhcp_client_accept (NMDhcpClient *self,
+ GError **error);
+
+gboolean nm_dhcp_client_decline (NMDhcpClient *self,
+ const char *error_message,
+ GError **error);
+
void nm_dhcp_client_stop (NMDhcpClient *self, gboolean release);
/* Backend helpers for subclasses */