Blame SOURCES/0022-dhclient-make-sure-link-local-address-is-ready-in-st.patch

df4638
From 9975d198a2c02e32c31c3e0f43d2aa79dfa7f508 Mon Sep 17 00:00:00 2001
df4638
From: Pavel Zhukov <pzhukov@redhat.com>
df4638
Date: Thu, 28 Feb 2019 15:30:21 +0100
df4638
Subject: [PATCH 22/26] dhclient: make sure link-local address is ready in
df4638
 stateless mode
df4638
Cc: pzhukov@redhat.com
df4638
df4638
Bug-url: https://bugzilla.redhat.com/1263466
df4638
---
df4638
 client/dhclient.c | 30 ++++++++++++++++++++----------
df4638
 1 file changed, 20 insertions(+), 10 deletions(-)
df4638
df4638
diff --git a/client/dhclient.c b/client/dhclient.c
df4638
index 4e5546a..9b65438 100644
df4638
--- a/client/dhclient.c
df4638
+++ b/client/dhclient.c
df4638
@@ -937,6 +937,12 @@ main(int argc, char **argv) {
df4638
 
df4638
 	inaddr_any.s_addr = INADDR_ANY;
df4638
 
df4638
+	/* Discover all the network interfaces. */
df4638
+	discover_interfaces(DISCOVER_UNCONFIGURED);
df4638
+
df4638
+	/* Parse the dhclient.conf file. */
df4638
+	read_client_conf();
df4638
+
df4638
 	/* Stateless special case. */
df4638
 	if (stateless) {
df4638
 		if (release_mode || (wanted_ia_na > 0) ||
df4638
@@ -953,12 +959,6 @@ main(int argc, char **argv) {
df4638
 		finish(0);
df4638
 	}
df4638
 
df4638
-	/* Discover all the network interfaces. */
df4638
-	discover_interfaces(DISCOVER_UNCONFIGURED);
df4638
-
df4638
-	/* Parse the dhclient.conf file. */
df4638
-	read_client_conf();
df4638
-
df4638
 	/* Parse any extra command line configuration arguments: */
df4638
 	if ((dhcp_client_identifier_arg != NULL) && (*dhcp_client_identifier_arg != '\0')) {
df4638
 		arg_conf_len = asprintf(&arg_conf, "send dhcp-client-identifier \"%s\";", dhcp_client_identifier_arg);
df4638
@@ -1413,20 +1413,30 @@ void run_stateless(int exit_mode, u_int16_t port)
df4638
 	IGNORE_UNUSED(port);
df4638
 #endif
df4638
 
df4638
-	/* Discover the network interface. */
df4638
-	discover_interfaces(DISCOVER_REQUESTED);
df4638
+	struct interface_info *ip;
df4638
 
df4638
 	if (!interfaces)
df4638
 		usage("No interfaces available for stateless command: %s", "-S");
df4638
 
df4638
-	/* Parse the dhclient.conf file. */
df4638
 #ifdef DHCP4o6
df4638
 	if (dhcpv4_over_dhcpv6) {
df4638
 		/* Mark we want to request IRT too! */
df4638
 		dhcpv4_over_dhcpv6++;
df4638
 	}
df4638
 #endif
df4638
-	read_client_conf();
df4638
+
df4638
+	for (ip = interfaces; ip; ip = ip->next) {
df4638
+		if ((interfaces_requested > 0) &&
df4638
+		    ((ip->flags & (INTERFACE_REQUESTED |
df4638
+				   INTERFACE_AUTOMATIC)) !=
df4638
+		     INTERFACE_REQUESTED))
df4638
+			continue;
df4638
+		script_init(ip->client, "PREINIT6", NULL);
df4638
+		script_go(ip->client);
df4638
+	}
df4638
+
df4638
+	/* Discover the network interface. */
df4638
+	discover_interfaces(DISCOVER_REQUESTED);
df4638
 
df4638
 	/* Parse the lease database. */
df4638
 	read_client_leases();
df4638
-- 
df4638
2.14.5
df4638