philipp / rpms / dhcp

Forked from rpms/dhcp 4 years ago
Clone

Blame SOURCES/dhcp-stateless-store-duid.patch

c360e8
diff -up dhcp-4.2.5/client/dhclient.c.stateless-store-duid dhcp-4.2.5/client/dhclient.c
c360e8
--- dhcp-4.2.5/client/dhclient.c.stateless-store-duid	2014-12-09 17:29:32.683444318 +0100
c360e8
+++ dhcp-4.2.5/client/dhclient.c	2014-12-09 17:30:53.917444318 +0100
c360e8
@@ -1151,7 +1151,9 @@ void run_stateless(int exit_mode)
c360e8
 		if (default_duid.buffer != NULL)
c360e8
 			data_string_forget(&default_duid, MDL);
c360e8
 
c360e8
-		form_duid(&default_duid, MDL);
c360e8
+		if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS &&
c360e8
+		    duid_type == DUID_LLT)
c360e8
+			write_duid(&default_duid);
c360e8
 	}
c360e8
 
c360e8
 	/* Start a configuration state machine. */