[pkg-dhcp-commits] [SCM] ISC DHCP packaging for Debian branch, master, updated. debian/4.1.1-P1-16.1-41-g1e15615
Andrew Pollock
apollock at debian.org
Sun Aug 28 20:09:15 UTC 2011
The following commit has been merged in the master branch:
commit 1e1561541f14e13765b4ce4dfae5a5a4ea98db55
Author: Andrew Pollock <apollock at debian.org>
Date: Sun Aug 28 13:08:38 2011 -0700
rfc3442-classless-routes.*: take care of link-local routes
According to RFC 3442, the router address 0.0.0.0 in the DHCP
parameter for the classless routes indicates a link-local route.
Do not add a gateway for this type of routes.
This should fix bug #521024
Patch from Peter Marschall
diff --git a/debian/changelog b/debian/changelog
index 0563b07..35ac4b9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -41,8 +41,10 @@ isc-dhcp (4.2.2-1) unstable; urgency=low
to harmonize the logic for setting the hostname (closes: #246155)
* apply patch from Peter Marschall to use one common script for the debug
hooks
+ * debian/rfc3442-classless-routes.{linux,kfreebsd}: applied patch from Peter
+ Marschall to take care of link-local routes (closes: #521024)
- -- Andrew Pollock <apollock at debian.org> Sat, 27 Aug 2011 22:20:52 -0700
+ -- Andrew Pollock <apollock at debian.org> Sun, 28 Aug 2011 13:07:27 -0700
isc-dhcp (4.1.1-P1-18) unstable; urgency=low
diff --git a/debian/rfc3442-classless-routes.kfreebsd b/debian/rfc3442-classless-routes.kfreebsd
index 6e14946..985f8af 100644
--- a/debian/rfc3442-classless-routes.kfreebsd
+++ b/debian/rfc3442-classless-routes.kfreebsd
@@ -16,6 +16,7 @@ if [ "$RUN" = "yes" ]; then
while [ $# -gt 0 ]; do
net_length=$1
+ via_arg="-interface ${interface}"
case $net_length in
32|31|30|29|28|27|26|25)
@@ -48,10 +49,16 @@ if [ "$RUN" = "yes" ]; then
;;
esac
+ # take care of link-local routes
+ if [ "${gateway}" != '0.0.0.0' ]; then
+ via_arg="gw ${gateway}"
+ fi
+
+ # set route (distinguish between host & net routes)
if [ "$net_length" -eq 32 ]; then
- /sbin/route add -host "${net_address}" gw "${gateway}"
+ /sbin/route add -host "${net_address}" "${via_arg}"
else
- /sbin/route add -net "${net_address}/${net_length}" gw "${gateway}"
+ /sbin/route add -net "${net_address}/${net_length}" "${via_arg}"
fi
done
fi
diff --git a/debian/rfc3442-classless-routes.linux b/debian/rfc3442-classless-routes.linux
index 18ce0c3..462fb46 100644
--- a/debian/rfc3442-classless-routes.linux
+++ b/debian/rfc3442-classless-routes.linux
@@ -16,6 +16,7 @@ if [ "$RUN" = "yes" ]; then
while [ $# -gt 0 ]; do
net_length=$1
+ via_arg=''
case $net_length in
32|31|30|29|28|27|26|25)
@@ -48,9 +49,14 @@ if [ "$RUN" = "yes" ]; then
;;
esac
+ # take care of link-local routes
+ if [ "${gateway}" != '0.0.0.0' ]; then
+ via_arg="via ${gateway}"
+ fi
+
# set route (ip detects host routes automatically)
ip -4 route add "${net_address}/${net_length}" \
- via "${gateway}" dev "${interface}" >/dev/null 2>&1
+ ${via_arg} dev "${interface}" >/dev/null 2>&1
done
fi
fi
--
ISC DHCP packaging for Debian
More information about the pkg-dhcp-commits
mailing list