rpms/dhcp/devel dhcp-3.0.3-static-routes.patch, NONE, 1.1 dhcp.spec, 1.72, 1.73
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Oct 17 18:54:15 UTC 2005
- Previous message (by thread): rpms/libselinux/devel .cvsignore, 1.79, 1.80 libselinux-rhat.patch, 1.59, 1.60 libselinux.spec, 1.128, 1.129 sources, 1.81, 1.82
- Next message (by thread): rpms/yelp/devel yelp-2.12.1-fedora-docs.patch, NONE, 1.1 yelp.spec, 1.35, 1.36
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jvdias
Update of /cvs/dist/rpms/dhcp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv2558
Modified Files:
dhcp.spec
Added Files:
dhcp-3.0.3-static-routes.patch
Log Message:
handle static-routes option properly in dhclient-script
dhcp-3.0.3-static-routes.patch:
linux | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
--- NEW FILE dhcp-3.0.3-static-routes.patch ---
--- dhcp-3.0.3/client/scripts/linux.static-routes 2005-10-17 14:50:27.886307000 -0400
+++ dhcp-3.0.3/client/scripts/linux 2005-10-17 14:25:53.000000000 -0400
@@ -165,6 +165,22 @@
echo $n_bits
}
+function class_bits()
+{
+ let ip=`IFS='.' ip2num $1`;
+ let bits=32
+ let mask='255';
+ for ((i=0; i <= 3; i++, 'mask<<=8')); do
+ let v='ip&mask';
+ if [ "$v" -eq 0 ] ; then
+ let bits-=8;
+ else
+ break;
+ fi;
+ done;
+ echo $bits;
+}
+
function add_default_gateway()
{
router=$1
@@ -244,12 +260,10 @@
# static routes
if [ "x$new_static_routes" != x ]; then
IFS=', ' static_routes=($new_static_routes)
- let i=0
- while [ $i -lt ${#static_routes[@]} ]; do
+ for((i=0; i<${#static_routes[@]}; i+=2)); do
target=${static_routes[$i]}
gateway=${static_routes[$i+1]}
- let i=i+2
- /sbin/ip route replace ${target}/32 via ${gateway} dev $interface
+ /sbin/ip route replace ${target}/`class_bits $target` via ${gateway} dev $interface
done
fi
fi
Index: dhcp.spec
===================================================================
RCS file: /cvs/dist/rpms/dhcp/devel/dhcp.spec,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- dhcp.spec 17 Oct 2005 16:50:08 -0000 1.72
+++ dhcp.spec 17 Oct 2005 18:54:10 -0000 1.73
@@ -65,6 +65,7 @@
Patch158: dhcp-3.0.3-bz167273.patch
Patch159: dhcp-3.0.3-failover_ports.patch
Patch160: dhcp-3.0.3-rt15293_bz160655.patch
+Patch161: dhcp-3.0.3-static-routes.patch
URL: http://isc.org/products/DHCP/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Prereq: /sbin/chkconfig
@@ -171,8 +172,8 @@
%patch157 -p1 -b .dhclient-script-up-down-hooks
%patch158 -p1 -b .bz167273
%patch159 -p1 -b .failover_ports
-%patch160 -p1 -b .fix_dhcpd_ms_trailing_nuls
-#%patch160 -p1 -b .fix_dhcpd_ms_trailing_nuls
+%patch160 -p1 -b .rt15293_bz160655
+%patch161 -p1 -b .static-routes
cp %SOURCE1 .
cat <<EOF >site.conf
VARDB=%{_localstatedir}/lib/dhcpd
@@ -306,9 +307,10 @@
%{_mandir}/man3/*
%changelog
-* Thu Oct 13 2005 Jason Vas Dias <jvdias at redhat.com> - 11:3.0.3-8
+* Thu Oct 13 2005 Jason Vas Dias <jvdias at redhat.com> - 11:3.0.3-10
- further fix for bug 160655 / ISC bug 15293 - upstream patch:
do NOT always strip trailing nulls in the dhcpd server
+- handle static-routes option properly in dhclient-script
* Fri Sep 23 2005 Jason Vas Dias <jvdias at redhat.com> - 11:3.0.3-7
- fix bug 169164: separate /var/lib/{dhcpd,dhclient} directories
- Previous message (by thread): rpms/libselinux/devel .cvsignore, 1.79, 1.80 libselinux-rhat.patch, 1.59, 1.60 libselinux.spec, 1.128, 1.129 sources, 1.81, 1.82
- Next message (by thread): rpms/yelp/devel yelp-2.12.1-fedora-docs.patch, NONE, 1.1 yelp.spec, 1.35, 1.36
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list