philipp / rpms / dhcp

Forked from rpms/dhcp 4 years ago
Clone

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

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