Bug#592539: [PATCH] IPv6 Server Support
Attached an updated patch for IPv6 server support. This cleans up the unnecessary translations that were in my previous patch, fixes some bugs (thanks to C.J. Adams-Collier for one bug fix), and I've rebased against the latest head. Feedback still sought on the folowing points: * the convention around "true" vs "yes" for values in /etc/default is not clear to me; it seems debconf always goes with true/false for a boolean, but many other scripts in /etc/default seem to use "yes". I just used "true". * Three new debconf values are added, with accompanying documentation; this impacts the translations but I don't see any way around it given the nature of the changes. Any feedback or suggestions welcome. Thanks, Steve diff --git a/debian/dhcpd6.conf b/debian/dhcpd6.conf new file mode 100644 index 000..551a80c --- /dev/null +++ b/debian/dhcpd6.conf @@ -0,0 +1,106 @@ +# +# Sample configuration file for ISC dhcpdv6 for Debian +# +# + +# IPv6 address valid lifetime +# (at the end the address is no longer usable by the client) +# (set to 30 days, the usual IPv6 default) +default-lease-time 2592000; + +# IPv6 address preferred lifetime +# (at the end the address is deprecated, i.e., the client should use +# other addresses for new connections) +# (set to 7 days, the usual IPv6 default) +preferred-lifetime 604800; + +# T1, the delay before Renew +# (default is 1/2 preferred lifetime) +# (set to 1 hour) +option dhcp-renewal-time 3600; + +# T2, the delay before Rebind (if Renews failed) +# (default is 3/4 preferred lifetime) +# (set to 2 hours) +option dhcp-rebinding-time 7200; + +# Enable RFC 5007 support (same than for DHCPv4) +allow leasequery; + +# Global definitions for name server address(es) and domain search list +#option dhcp6.name-servers 3ffe:501::100:200:ff:fe00:3f3e; +#option dhcp6.domain-search "test.example.com","example.com"; + +# Set preference to 255 (maximum) in order to avoid waiting for +# additional servers when there is only one +##option dhcp6.preference 255; + +# Server side command to enable rapid-commit (2 packet exchange) +##option dhcp6.rapid-commit; + +# The delay before information-request refresh +# (minimum is 10 minutes, maximum one day, default is to not refresh) +# (set to 6 hours) +option dhcp6.info-refresh-time 21600; + +# The path of the lease file +#dhcpv6-lease-file-name "/var/lib/dhcp/dhcpd6.leases"; + +# Static definition (must be global) +#host myclient { +# # The entry is looked up by this +# host-identifier option +# dhcp6.client-id 00:01:00:01:00:04:93:e0:00:00:00:00:a2:a2; + +# # A fixed address +# fixed-address6 3ffe:501::100::1234; + +# # A fixed prefix +# fixed-prefix6 3ffe:501::101::/64; + +# # Override of the global definitions, +# # works only when a resource (address or prefix) is assigned +# option dhcp6.name-servers 3ffe:501::100:200:ff:fe00:4f4e; + +# # For debug (to see when the entry statements are executed) +# # (log "sol" when a matching Solicitation is received) +# ##if packet(0,1) = 1 { log(debug,"sol"); } +#} + +#host otherclient { +## This host entry is hopefully matched if the client supplies a DUID-LL +## or DUID-LLT containing this MAC address. +#hardware ethernet 01:00:80:a2:55:67; +# +#fixed-address6 3ffe:501::100::4321; +#} + +# The subnet where the server is attached +# (i.e., the server has an address in this subnet) +#subnet6 3ffe:501::100::/64 { +# # Two addresses available to clients +# # (the third client should get NoAddrsAvail) +# range6 3ffe:501::100::10 3ffe:501::100::11; +# +# # Use the whole /64 prefix for temporary addresses +# # (i.e., direct application of RFC 4941) +# range6 3ffe:501::100:: temporary; +# +# # Some /64 prefixes available for Prefix Delegation (RFC 3633) +# prefix6 3ffe:501::100:: 3ffe:501::111:: /64; +#} + +# A second subnet behind a relay agent +#subnet6 3ffe:501::101::/64 { +# range6 3ffe:501::101::10 3ffe:501::101::11; +# +# # Override of the global definitions, +# # works only when a resource (address or prefix) is assigned +# option dhcp6.name-servers 3ffe:501::101:200:ff:fe00:3f3e; +# +#} + +# A third subnet behind a relay agent chain +#subnet6 3ffe:501::102::/64 { +# range6 3ffe:501::102::10 3ffe:501::102::11; +#} diff --git a/debian/isc-dhcp-server.config b/debian/isc-dhcp-server.config index 412c4b3..9bb7894 100644 --- a/debian/isc-dhcp-server.config +++ b/debian/isc-dhcp-server.config @@ -13,12 +13,18 @@ INITCONFFILE=/etc/default/isc-dhcp-server # preserve the configuration. if [ -r ${INITCONFFILE} ]; then . ${INITCONFFILE} + db_set isc-dhcp-server/v4_enabled "${V4_ENABLED:-true}" + db_set isc-dhcp-server/v6_enabled "${V6_ENABLED:-false}" db_set isc-dhcp-server/interfaces "${INTERFACES}" + db_set isc-dhcp-server/interfaces_v6 "${INTERFACES_V6}" fi db_title "DHCP Server" +db_input low isc-dhcp-server/v4_enabled || true +db_input low isc-dhcp-server/v6_enabled
Bug#592539: patch
Hi, I've created a patch (for 4.2.4-1) which adds (a slightly modified version of http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=22;filename=isc-dhcp-server;att=1;bug=592539) the ability to start listening on IPv6 for isc-dhcp-server, as well the debconf parameters needed to configure the running of zero/one/two instances (for IPv4 and/or IPv6). Cheers Geza diff -urN isc-dhcp-4.2.2.dfsg.1/debian/dhclient6.conf isc-dhcp-4.2.2.dfsg.1/debian/dhclient6.conf --- isc-dhcp-4.2.2.dfsg.1/debian/dhclient6.conf 1970-01-01 01:00:00.0 +0100 +++ isc-dhcp-4.2.2.dfsg.1/debian/dhclient6.conf 2012-06-25 10:28:12.972577091 +0200 @@ -0,0 +1,49 @@ +# Client configuration file example for DHCPv6 + +# The client side command to enable rapid-commit (2 packet exchange) +##send dhcp6.rapid-commit; + +# name-servers and domain-search are requested by default. +# here is the way to request sip-servers-addresses too +#also request dhcp6.sip-servers-addresses; + +# Likely to be useful: the script path +#script "/etc/dhcp3//dhclient-script"; + +#send host-name "andare.fugue.com"; +send host-name = gethostname(); +#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; +#send dhcp-lease-time 3600; +#supersede domain-name "fugue.com home.vix.com"; +#prepend domain-name-servers 127.0.0.1; +#request subnet-mask, broadcast-address, time-offset, routers, +# domain-name, domain-name-servers, domain-search, host-name, +# netbios-name-servers, netbios-scope, interface-mtu, +# rfc3442-classless-static-routes, ntp-servers; +#require subnet-mask, domain-name-servers; +#timeout 60; +#retry 60; +#reboot 10; +#select-timeout 5; +#initial-interval 2; +#script "/etc/dhcp3/dhclient-script"; +#media "-link0 -link1 -link2", "link0 link1"; +#reject 01:00:a0::10; + +#alias { +# interface "eth0"; +# fixed-address6 01:00:a0::10; +# fixed-prefix6 01:00:a0::/64; +#} + +#lease { +# interface "eth0"; +# fixed-address 01:00:a0::10; +# medium "link0 link1"; +# option host-name "andare.swiftmedia.com"; +# fixed-prefix6 01:00:a0::/64; +# option dhcp6-name-servers ::1; +# renew 2 2000/1/12 00:00:01; +# rebind 2 2000/1/12 00:00:01; +# expire 2 2000/1/12 00:00:01; +#} diff -urN isc-dhcp-4.2.2.dfsg.1/debian/dhcpd6.conf isc-dhcp-4.2.2.dfsg.1/debian/dhcpd6.conf --- isc-dhcp-4.2.2.dfsg.1/debian/dhcpd6.conf 1970-01-01 01:00:00.0 +0100 +++ isc-dhcp-4.2.2.dfsg.1/debian/dhcpd6.conf 2012-06-25 10:34:29.816576503 +0200 @@ -0,0 +1,106 @@ +# +# Sample configuration file for ISC dhcpdv6 for Debian +# +# + +# IPv6 address valid lifetime +# (at the end the address is no longer usable by the client) +# (set to 30 days, the usual IPv6 default) +default-lease-time 2592000; + +# IPv6 address preferred lifetime +# (at the end the address is deprecated, i.e., the client should use +# other addresses for new connections) +# (set to 7 days, the usual IPv6 default) +preferred-lifetime 604800; + +# T1, the delay before Renew +# (default is 1/2 preferred lifetime) +# (set to 1 hour) +option dhcp-renewal-time 3600; + +# T2, the delay before Rebind (if Renews failed) +# (default is 3/4 preferred lifetime) +# (set to 2 hours) +option dhcp-rebinding-time 7200; + +# Enable RFC 5007 support (same than for DHCPv4) +allow leasequery; + +# Global definitions for name server address(es) and domain search list +#option dhcp6.name-servers 3ffe:501::100:200:ff:fe00:3f3e; +#option dhcp6.domain-search "test.example.com","example.com"; + +# Set preference to 255 (maximum) in order to avoid waiting for +# additional servers when there is only one +##option dhcp6.preference 255; + +# Server side command to enable rapid-commit (2 packet exchange) +##option dhcp6.rapid-commit; + +# The delay before information-request refresh +# (minimum is 10 minutes, maximum one day, default is to not refresh) +# (set to 6 hours) +option dhcp6.info-refresh-time 21600; + +# The path of the lease file +#dhcpv6-lease-file-name "/var/lib/dhcp/dhcpd6.leases"; + +# Static definition (must be global) +#host myclient { +# # The entry is looked up by this +# host-identifier option +# dhcp6.client-id 00:01:00:01:00:04:93:e0:00:00:00:00:a2:a2; + +# # A fixed address +# fixed-address6 3ffe:501::100::1234; + +# # A fixed prefix +# fixed-prefix6 3ffe:501::101::/64; + +# # Override of the global definitions, +# # works only when a resource (address or prefix) is assigned +# option dhcp6.name-servers 3ffe:501::100:200:ff:fe00:4f4e; + +# # For debug (to see when the entry statements are executed) +# # (log "sol" when a matching Solicitation is received) +# ##if packet(0,1) = 1 { log(debug,"sol"); } +#} + +#host otherclient { +## This host entry is hopefully matched if the client supplies a DUID-LL +## or DUID-LLT containing this MAC address. +#hardware ethernet 01:00:80:a2:55:67; +# +#fixed-address6 3ffe:501::100::4321; +#} + +# The subnet where the server is attached +# (i.e., the server has an address in this subnet) +#subnet6 3ffe:501::100::/