leases file. Default is true.
[ISC-Bugs #45046]
+- Changed the default value of the prefix length passed by dhclient into the
+ client script for each IPv6 address, from 64 to 128. In addition, dhclient
+ now supports a command line argument, --address-prefix-len <len>, which may
+ be used to override the default value. PLEASE NOTE: If your DHCPv6 clients
+ require a value other than 128, you MUST specify the value via this new
+ command line argument. Prior to this the only way to alter the value was at
+ compile time by changing DHCLIENT_DEFAULT_PREFIX_LEN in include/sites.h.
+ [ISC-Bugs #23252]
+
Changes since 4.3.0 (bug fixes)
- Tidy up several small tickets.
extern int onetry;
extern int stateless;
extern int prefix_len_hint;
-
+extern int address_prefix_len;
/*
* Assign DHCPv6 port numbers as a client.
(unsigned) addr->plen);
} else {
client_envadd(client, prefix, "ip6_prefixlen",
- "%d", DHCLIENT_DEFAULT_PREFIX_LEN);
+ "%d", address_prefix_len);
client_envadd(client, prefix, "ip6_address",
"%s", piaddr(addr->address));
}
int prefix_len_hint = 0;
#endif
+int address_prefix_len = DHCLIENT_DEFAULT_PREFIX_LEN;
char *mockup_relay = NULL;
char *progname = NULL;
#define DHCLIENT_USAGE0 \
"[-4|-6] [-SNTPRI1dvrxi] [-nw] -4o6 <port>] [-p <port>] [-D LL|LLT]\n" \
" [--dad-wait-time <seconds>] [--prefix-len-hint <length>]\n" \
-" [--decline-wait-time <seconds>]\n"
+" [--decline-wait-time <seconds>]\n" \
+" [--address-prefix-len length]\n"
#else /* DHCP4o6 */
#define DHCLIENT_USAGE0 \
"[-4|-6] [-SNTPRI1dvrxi] [-nw] [-p <port>] [-D LL|LLT]\n" \
" [--dad-wait-time <seconds>] [--prefix-len-hint <length>]\n" \
-" [--decline-wait-time <seconds>]\n"
+" [--decline-wait-time <seconds>]\n" \
+" [--address-prefix-len length]\n"
#endif
#else /* DHCPv6 */
#define DHCLIENT_USAGE0 \
if (++i == argc) {
usage(use_noarg, argv[i-1]);
}
-
errno = 0;
dad_wait_time = (int)strtol(argv[i], &s, 10);
if (errno || (*s != '\0') || (dad_wait_time < 0)) {
usage("Invalid value for --prefix-len-hint: %s",
argv[i]);
}
+ } else if (!strcmp(argv[i], "--address-prefix-len")) {
+ if (++i == argc) {
+ usage(use_noarg, argv[i-1]);
+ }
+ errno = 0;
+ address_prefix_len = (int)strtol(argv[i], &s, 10);
+ if (errno || (*s != '\0') ||
+ (address_prefix_len < 0)) {
+ usage("Invalid value for"
+ " --address-prefix-len: %s", argv[i]);
+ }
#endif /* DHCPv6 */
} else if (!strcmp(argv[i], "--decline-wait-time")) {
if (++i == argc) {
is a host address and doesn't include any on-link information.
64 indicates that the first 64 bits are the subnet or on-link
prefix. */
-#define DHCLIENT_DEFAULT_PREFIX_LEN 64
+#define DHCLIENT_DEFAULT_PREFIX_LEN 128
/* Enable the gentle shutdown signal handling. Currently this
means that on SIGINT or SIGTERM a client will release its