[PATCH RFC v2 0/3] dhclient: add --prefix-len option
H. Peter Anvin
hpa at zytor.com
Wed Dec 2 19:21:14 UTC 2015
I have a regular need for setting a request for a specific prefix
length delegation in the IPv6 client. This adds this feature as a new
command line option (just as the number of prefixes are requested via
possibly multiple -P options.)
In the process, I found a fair bit of duplicated or near-duplicated
code, and so I ended up refactoring some of the code, with the result
that the total patchset is actually a fair bit of reduction in total
code.
I have the following questions with regards to the protocol and
desired behavior:
- The current patch will only emit a null prefix for a SOLICIT
message, but are there other messages where a null prefix is also
appropriate?
- The current patch specifies a global prefix length, but would it be
better if that prefix length was settable for each IA_PD IAID? In
that case, what do people think of any of the following command line
syntaxes (where # is the number of bits):
-P#
-P=#
--prefix=#
-P #
The last one would break if it is possible for a purely numeric
argument to follow a -P option on the current command line (I don't
know if there are any systems that use numbers for interface names,
perhaps?)
Changes in version 2:
- Add a patch to support more than 256 IAIDs, theoretically possible.
- Don't omit expired prefixes for a SOLICIT message.
client/dhc6.c | 1082 +++++++++++++++++++++--------------------------------
client/dhclient.8 | 7 +
client/dhclient.c | 13 +-
includes/dhcpd.h | 1 +
4 files changed, 441 insertions(+), 662 deletions(-)
H. Peter Anvin (3):
dhclient: IPv6: factor common code in dhc6.c
dhclient: IPv6: support more than 256 IAIDs
dhclient: IPv6: add support for setting prefix length for IA_PD
More information about the dhcp-workers
mailing list