]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[v4_1_esv] dhclient -6 now supports option expressions such as prepend
authorThomas Markwalder <tmark@isc.org>
Mon, 18 Jan 2016 13:55:41 +0000 (08:55 -0500)
committerThomas Markwalder <tmark@isc.org>
Mon, 18 Jan 2016 13:55:41 +0000 (08:55 -0500)
    Merges in rt39952.

RELNOTES
client/dhc6.c

index af06ba69111e5a327510f2109fcf662d1c7ea6d8..6c54d22f27256e28acb450d5e7779245d5baa97a 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -138,6 +138,12 @@ by Eric Young (eay@cryptsoft.com).
   Thanks to Andrey Jr. Melnikov for the bug report.
   [ISC-Bugs #41217]
 
+- Option expressions, such as prepend and append, are now supported when
+  running dhclient for IPv6.  Prior to this such statements in the
+  client configuration file would be parsed but have no affect.  Thanks
+  to Jiri Popelka at Red Hat for reporting the issue.
+  [ISC-Bugs #39952]
+
                        Changes since 4.1-ESV-R12b1
 
 - None
index 5a04080b6a67f09a510b0e61cfa1ae98b51084c9..90a6b3af58ddbaab31e8fc7aac20b3dba2a7a157 100644 (file)
@@ -1,7 +1,7 @@
 /* dhc6.c - DHCPv6 client routines. */
 
 /*
- * Copyright (c) 2012-2015 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2012-2016 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 2006-2010 by Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -632,7 +632,7 @@ dhc6_dup_addr(struct dhc6_addr *addr, const char *file, int line)
  *
  */
 static struct dhc6_lease *
-dhc6_leaseify(struct packet *packet)
+dhc6_leaseify(struct packet *packet, struct client_state* client)
 {
        struct data_string ds;
        struct dhc6_lease *lease;
@@ -741,6 +741,11 @@ dhc6_leaseify(struct packet *packet)
                                      lease->server_id.data, 52));
        }
 
+       execute_statements_in_scope(NULL, (struct packet *)packet, NULL,
+                                   client, lease->options, lease->options,
+                                   &global_scope, client->config->on_receipt,
+                                   NULL);
+
        return lease;
 }
 
@@ -3174,7 +3179,7 @@ init_handler(struct packet *packet, struct client_state *client)
                return;
        }
 
-       lease = dhc6_leaseify(packet);
+       lease = dhc6_leaseify(packet, client);
 
        /* Out of memory or corrupt packet condition...hopefully a temporary
         * problem.  Returning now makes us try to retransmit later.
@@ -3264,6 +3269,12 @@ info_request_handler(struct packet *packet, struct client_state *client)
        option_state_reference(&client->active_lease->options,
                               packet->options, MDL);
 
+       execute_statements_in_scope(NULL, (struct packet *)packet, NULL, client,
+                                   client->active_lease->options,
+                                   client->active_lease->options,
+                                   &global_scope, client->config->on_receipt,
+                                   NULL);
+
        start_informed(client);
 }
 
@@ -3298,7 +3309,7 @@ rapid_commit_handler(struct packet *packet, struct client_state *client)
                return;
        }
 
-       lease = dhc6_leaseify(packet);
+       lease = dhc6_leaseify(packet, client);
 
        /* Out of memory or corrupt packet condition...hopefully a temporary
         * problem.  Returning now makes us try to retransmit later.
@@ -4239,7 +4250,7 @@ reply_handler(struct packet *packet, struct client_state *client)
                return;
        }
 
-       lease = dhc6_leaseify(packet);
+       lease = dhc6_leaseify(packet, client);
 
        /* Out of memory or corrupt packet condition...hopefully a temporary
         * problem.  Returning now makes us try to retransmit later.