3681f4
diff --git a/client/dhc6.c b/client/dhc6.c
3681f4
index 5460ee1..fe0057c 100644
3681f4
--- a/client/dhc6.c
3681f4
+++ b/client/dhc6.c
3681f4
@@ -148,6 +148,7 @@ static int dhc6_score_lease(struct client_state *client,
3681f4
 
3681f4
 extern int onetry;
3681f4
 extern int stateless;
3681f4
+extern int address_prefix_len;
3681f4
 
3681f4
 /*
3681f4
  * Assign DHCPv6 port numbers as a client.
3681f4
@@ -4364,7 +4365,7 @@ dhc6_marshall_values(const char *prefix, struct client_state *client,
3681f4
 				      (unsigned) addr->plen);
3681f4
 		} else {
3681f4
 			client_envadd(client, prefix, "ip6_prefixlen",
3681f4
-				      "%d", DHCLIENT_DEFAULT_PREFIX_LEN);
3681f4
+				      "%d", address_prefix_len);
3681f4
 			client_envadd(client, prefix, "ip6_address",
3681f4
 				      "%s", piaddr(addr->address));
3681f4
 		}
3681f4
diff --git a/client/dhclient.c b/client/dhclient.c
3681f4
index b61da43..05bfc7e 100644
3681f4
--- a/client/dhclient.c
3681f4
+++ b/client/dhclient.c
3681f4
@@ -114,6 +114,7 @@ char *progname = NULL;
3681f4
 
3681f4
 int bootp_broadcast_always = 0;
3681f4
 
3681f4
+int address_prefix_len = DHCLIENT_DEFAULT_PREFIX_LEN;
3681f4
 extern struct option *default_requested_options[];
3681f4
 
3681f4
 void run_stateless(int exit_mode, u_int16_t port);
3681f4
@@ -192,6 +193,7 @@ usage(const char *sfmt, const char *sarg)
3681f4
 #endif
3681f4
 #else /* DHCPv6 */
3681f4
 		  "[-I1dvrxi] [-nw] [-p <port>] [-D LL|LLT] \n"
3681f4
+                   "                [--address-prefix-len length]\n"
3681f4
 #endif /* DHCPv6 */
3681f4
 		  "                [-s server-addr] [-cf config-file]\n"
3681f4
 		  "                [-df duid-file] [-lf lease-file]\n"
3681f4
@@ -392,6 +394,17 @@ main(int argc, char **argv) {
3681f4
 			tmp->next = client_env;
3681f4
 			client_env = tmp;
3681f4
 			client_env_count++;
3681f4
+		} else if (!strcmp(argv[i], "--address-prefix-len")) {
3681f4
+			if (++i == argc) {
3681f4
+				usage(use_noarg, argv[i-1]);
3681f4
+			}
3681f4
+			errno = 0;
3681f4
+			address_prefix_len = (int)strtol(argv[i], &s, 10);
3681f4
+			if (errno || (*s != '\0') ||
3681f4
+			    (address_prefix_len < 0)) {
3681f4
+ 		                usage("Invalid value for"       
3681f4
+				      " --address-prefix-len: %s", argv[i]);
3681f4
+                       }
3681f4
 #ifdef DHCPv6
3681f4
 		} else if (!strcmp(argv[i], "-S")) {
3681f4
 			if (local_family_set && (local_family == AF_INET)) {
3681f4
diff --git a/includes/site.h b/includes/site.h
3681f4
index b2f7fd7..aad9711 100644
3681f4
--- a/includes/site.h
3681f4
+++ b/includes/site.h
3681f4
@@ -286,7 +286,7 @@
3681f4
    is a host address and doesn't include any on-link information.
3681f4
    64 indicates that the first 64 bits are the subnet or on-link
3681f4
    prefix. */
3681f4
-#define DHCLIENT_DEFAULT_PREFIX_LEN 64
3681f4
+#define DHCLIENT_DEFAULT_PREFIX_LEN 128
3681f4
 
3681f4
 /* Enable the gentle shutdown signal handling.  Currently this
3681f4
    means that on SIGINT or SIGTERM a client will release its
3681f4
diff --git a/client/dhclient.c b/client/dhclient.c
3681f4
index 2f29591..6c8b145 100644
3681f4
diff --git a/client/dhclient.c b/client/dhclient.c
3681f4
index b0bf2bf..f7b1476 100644
3681f4
--- a/client/dhclient.c
3681f4
+++ b/client/dhclient.c
3681f4
@@ -193,7 +193,6 @@ usage(const char *sfmt, const char *sarg)
3681f4
 #endif
3681f4
 #else /* DHCPv6 */
3681f4
 		  "[-I1dvrxi] [-nw] [-p <port>] [-D LL|LLT] \n"
3681f4
-                   "                [--address-prefix-len length]\n"
3681f4
 #endif /* DHCPv6 */
3681f4
 		  "                [-s server-addr] [-cf config-file]\n"
3681f4
 		  "                [-df duid-file] [-lf lease-file]\n"
3681f4
@@ -202,6 +201,7 @@ usage(const char *sfmt, const char *sarg)
3681f4
 		  "                [-C <dhcp-client-identifier>] [-B]\n"
3681f4
 		  "                [-H <host-name> | -F <fqdn.fqdn>] [--timeout <timeout>]\n"
3681f4
 		  "                [-V <vendor-class-identifier>]\n"
3681f4
+		  "                [--address-prefix-len length]\n"
3681f4
 		  "                [--request-options <request option list>]",
3681f4
 		  isc_file_basename(progname));
3681f4
 }