philipp / rpms / dhcp

Forked from rpms/dhcp 4 years ago
Clone

Blame SOURCES/dhcp-prepend.patch

6736f5
diff -up dhcp-4.2.5/client/dhc6.c.prepend dhcp-4.2.5/client/dhc6.c
6736f5
--- dhcp-4.2.5/client/dhc6.c.prepend	2016-04-18 14:21:41.062502036 +0200
6736f5
+++ dhcp-4.2.5/client/dhc6.c	2016-04-18 14:25:11.683732506 +0200
6736f5
@@ -595,7 +595,7 @@ dhc6_dup_addr(struct dhc6_addr *addr, co
6736f5
  * Parsed options are deleted in order to not save them in the lease file.
6736f5
  */
6736f5
 static struct dhc6_lease *
6736f5
-dhc6_leaseify(struct packet *packet)
6736f5
+dhc6_leaseify(struct packet *packet, struct client_state* client)
6736f5
 {
6736f5
 	struct data_string ds;
6736f5
 	struct dhc6_lease *lease;
6736f5
@@ -687,6 +687,11 @@ dhc6_leaseify(struct packet *packet)
6736f5
 				      lease->server_id.data, 52));
6736f5
 	}
6736f5
 
6736f5
+	execute_statements_in_scope(NULL, (struct packet *)packet, NULL,
6736f5
+				    client, lease->options, lease->options,
6736f5
+				    &global_scope, client->config->on_receipt,
6736f5
+				    NULL);
6736f5
+
6736f5
 	return lease;
6736f5
 }
6736f5
 
6736f5
@@ -2892,7 +2897,7 @@ init_handler(struct packet *packet, stru
6736f5
 		return;
6736f5
 	}
6736f5
 
6736f5
-	lease = dhc6_leaseify(packet);
6736f5
+	lease = dhc6_leaseify(packet, client);
6736f5
 
6736f5
 	if (dhc6_check_advertise(lease) != ISC_R_SUCCESS) {
6736f5
 		log_debug("PRC: Lease failed to satisfy.");
6736f5
@@ -2975,6 +2980,12 @@ info_request_handler(struct packet *pack
6736f5
 	option_state_reference(&client->active_lease->options,
6736f5
 			       packet->options, MDL);
6736f5
 
6736f5
+	execute_statements_in_scope(NULL, (struct packet *)packet, NULL, client,
6736f5
+				    client->active_lease->options,
6736f5
+				    client->active_lease->options,
6736f5
+				    &global_scope, client->config->on_receipt,
6736f5
+				    NULL);
6736f5
+
6736f5
 	start_informed(client);
6736f5
 }
6736f5
 
6736f5
@@ -3009,7 +3020,7 @@ rapid_commit_handler(struct packet *pack
6736f5
 		return;
6736f5
 	}
6736f5
 
6736f5
-	lease = dhc6_leaseify(packet);
6736f5
+	lease = dhc6_leaseify(packet, client);
6736f5
 
6736f5
 	/* This is an out of memory condition...hopefully a temporary
6736f5
 	 * problem.  Returning now makes us try to retransmit later.
6736f5
@@ -3823,7 +3834,7 @@ reply_handler(struct packet *packet, str
6736f5
 		return;
6736f5
 	}
6736f5
 
6736f5
-	lease = dhc6_leaseify(packet);
6736f5
+	lease = dhc6_leaseify(packet, client);
6736f5
 
6736f5
 	/* This is an out of memory condition...hopefully a temporary
6736f5
 	 * problem.  Returning now makes us try to retransmit later.
6736f5
diff -up dhcp-4.2.5/RELNOTES.prepend dhcp-4.2.5/RELNOTES