[pkg-dhcp-commits] [isc-dhcp] 08/09: release 4.3.3-1
Michael Gilbert
mgilbert at moszumanska.debian.org
Sat Sep 5 23:44:17 UTC 2015
This is an automated email from the git hooks/post-receive script.
mgilbert pushed a commit to branch master
in repository isc-dhcp.
commit d08f9fa9ed08595325775b926f1d56c3239acb24
Author: Michael Gilbert <mgilbert at debian.org>
Date: Sat Sep 5 23:11:58 2015 +0000
release 4.3.3-1
---
debian/changelog | 13 +++---
debian/dhclient-script.linux.udeb | 83 ++++++++++++++++++++++++++++++++++-----
2 files changed, 82 insertions(+), 14 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 1ce270c..5ce1528 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,16 +1,19 @@
-isc-dhcp (4.3.2-2) UNRELEASED; urgency=medium
+isc-dhcp (4.3.3-1) unstable; urgency=medium
+ * New upstream release.
* Add uversionmangle to debian/watch.
- * Add a logcheck snippet for the dhcp server (closes: #688339).
- - Thanks to Jonathan Wiltshire.
* Restore Enhances field for the ldap package (closes: #790164).
+ * Add a logcheck snippet for the server package (closes: #688339).
+ - Thanks to Jonathan Wiltshire.
+ * Add DHCPv6 support to dhclient-script.linux.udeb (closes: #635897).
+ - Thanks to Colin Watson.
+ * Add policycoreutils dependency to isc-dhcp-server (closes: #797276).
* Fix undefined variables in dhclient-script.kfreebsd (closes: #691090).
- Thanks to Peter Marschall.
- * Make policycoreutils a dependency of isc-dhcp-server (closes: #797276).
* Avoid condition where hostname could be set to '(none)' (closes: #604883).
- Thanks to Pavel Cahyna.
- -- Michael Gilbert <mgilbert at debian.org> Sat, 27 Jun 2015 15:31:48 +0000
+ -- Michael Gilbert <mgilbert at debian.org> Sat, 05 Sep 2015 19:20:42 +0000
isc-dhcp (4.3.2-1) unstable; urgency=medium
diff --git a/debian/dhclient-script.linux.udeb b/debian/dhclient-script.linux.udeb
index 58d011d..d17cf0f 100644
--- a/debian/dhclient-script.linux.udeb
+++ b/debian/dhclient-script.linux.udeb
@@ -14,6 +14,7 @@ set -e
make_resolv_conf() {
local new_resolv_conf
+ # DHCPv4
if [ -n "$new_domain_name" ] || [ -n "$new_domain_name_servers" ]; then
new_resolv_conf=/etc/resolv.conf.dhclient-new
rm -f $new_resolv_conf
@@ -22,9 +23,31 @@ make_resolv_conf() {
echo "search $new_domain_name" >>$new_resolv_conf
fi
- for nameserver in $new_domain_name_servers; do
- echo "nameserver $nameserver" >>$new_resolv_conf
- done
+ if [ -n "$new_domain_name_servers" ]; then
+ for nameserver in $new_domain_name_servers; do
+ echo "nameserver $nameserver" >>$new_resolv_conf
+ done
+ else # keep 'old' nameservers
+ grep -i '^nameserver' /etc/resolv.conf >>$new_resolv_conf
+ fi
+
+ mv $new_resolv_conf /etc/resolv.conf
+ # DHCPv6
+ elif [ -n "$new_dhcp6_domain_search" ] || [ -n "$new_dhcp6_name_servers" ]; then
+ new_resolv_conf=/etc/resolv.conf.dhclient-new
+ rm -f $new_resolv_conf
+
+ if [ -n "$new_dhcp6_domain_search" ]; then
+ echo "search $new_dhcp6_domain_search" >> $new_resolv_conf
+ fi
+
+ if [ -n "$new_dhcp6_name_servers" ]; then
+ for nameserver in $new_dhcp6_name_servers; do
+ echo "nameserver $nameserver" >>$new_resolv_conf
+ done
+ else # keep 'old' nameservers
+ grep -i '^nameserver' /etc/resolv.conf >>$new_resolv_conf
+ fi
mv $new_resolv_conf /etc/resolv.conf
fi
@@ -53,11 +76,14 @@ fi
# Execute the operation
case "$reason" in
+
+ ### DHCPv4 Handlers
+
MEDIUM|ARPCHECK|ARPSEND)
# Do nothing
;;
PREINIT)
- ip link set $interface up
+ ip link set dev $interface up
# We need to give the kernel some time to get the interface up.
sleep 1
@@ -83,14 +109,15 @@ case "$reason" in
if [ -z "$old_ip_address" ] ||
[ "$old_ip_address" != "$new_ip_address" ] ||
[ "$reason" = "BOUND" ] || [ "$reason" = "REBOOT" ]; then
+ ip -4 addr add $new_ip_address$new_mask $new_broadcast_arg dev $interface
ip link set $interface up
- ip addr flush dev $interface
+ ip -4 addr flush dev $interface
ip addr add $new_ip_address$new_mask ${new_broadcast_address:+broadcast $new_broadcast_address} \
dev $interface
for router in $new_routers; do
- ip route add default via $router
+ ip -4 route add default via $router dev $interface
done
fi
@@ -107,9 +134,7 @@ case "$reason" in
EXPIRE|FAIL|RELEASE|STOP)
if [ -n "$old_ip_address" ]; then
- # Shut down interface, which will delete routes and clear arp cache.
- ip addr flush dev $interface
- ip link set $interface down
+ ip -4 addr flush dev $interface
fi
;;
@@ -118,6 +143,46 @@ case "$reason" in
ip link set $interface down
;;
+
+ ### DHCPv6 Handlers
+ # TODO handle prefix change: ?based on ${old_ip6_prefix} and ${new_ip6_prefix}?
+
+ PREINIT6)
+ # ensure interface is up
+ ip link set $interface up
+
+ # flush any stale global permanent IPs from interface
+ ip -6 addr flush dev $interface scope global permanent
+
+ ;;
+
+ BOUND6|RENEW6|REBIND6)
+ if [ "$new_ip6_address" ] && [ "$new_ip6_prefixlen" ]; then
+ ip -6 addr add $new_ip6_address/$new_ip6_prefixlen \
+ dev $interface scope global
+ fi
+
+ make_resolv_conf
+
+ # Get the domain name into a file suitable for netcfg to read.
+ printf "${new_dhcp6_domain_search%% *}" > /tmp/domain_name
+
+ ;;
+
+ DEPREF6)
+ if [ "$new_ip6_prefixlen" ]; then
+ ip -6 addr change $cur_ip6_address/$cur_ip6_prefixlen \
+ dev $interface scope global preferred_lft 0
+ fi
+
+ ;;
+
+ EXPIRE6|RELEASE6|STOP6)
+ if [ "$old_ip6_address" ] && [ "$old_ip6_prefixlen" ]; then
+ ip -6 addr del $old_ip6_address/$old_ip6_prefixlen dev $interface
+ fi
+
+ ;;
esac
exit 0
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-dhcp/isc-dhcp.git
More information about the pkg-dhcp-commits
mailing list