Description: n-dhcp4: Do not set ciaddr in DISCOVER state
 This is invalid according to RFC 2131 table 1 ("Description of fields in a
 DHCP message").
Origin: backport, https://github.com/nettools/n-dhcp4/commit/0d4dcc9bb45d5a63d53a787289ad79823343e624
Bug: https://github.com/nettools/n-dhcp4/issues/45
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/2126573
--- a/src/n-dhcp4/src/n-dhcp4-c-connection.c
+++ b/src/n-dhcp4/src/n-dhcp4-c-connection.c
@@ -379,6 +379,10 @@
         *timeoutp = timeout;
 }
 
+void n_dhcp4_c_connection_clear_client_ip(NDhcp4CConnection *connection) {
+        connection->client_ip = INADDR_ANY;
+}
+
 static int n_dhcp4_c_connection_packet_broadcast(NDhcp4CConnection *connection,
                                                  NDhcp4Outgoing *message) {
         int r;
--- a/src/n-dhcp4/src/n-dhcp4-c-probe.c
+++ b/src/n-dhcp4/src/n-dhcp4-c-probe.c
@@ -703,6 +703,7 @@
 
         switch (probe->state) {
         case N_DHCP4_CLIENT_PROBE_STATE_INIT:
+                n_dhcp4_c_connection_clear_client_ip(&probe->connection);
                 r = n_dhcp4_c_connection_listen(&probe->connection);
                 if (r)
                         return r;
--- a/src/n-dhcp4/src/n-dhcp4-private.h
+++ b/src/n-dhcp4/src/n-dhcp4-private.h
@@ -617,6 +617,8 @@
 void n_dhcp4_c_connection_get_timeout(NDhcp4CConnection *connection,
                                       uint64_t *timeoutp);
 
+void n_dhcp4_c_connection_clear_client_ip(NDhcp4CConnection *connection);
+
 int n_dhcp4_c_connection_discover_new(NDhcp4CConnection *connection,
                                       NDhcp4Outgoing **request);
 int n_dhcp4_c_connection_select_new(NDhcp4CConnection *connection,
