SHA256
1
0
forked from pool/dhcp

Accepting request 45247 from network:dhcp

Copy from network:dhcp/dhcp based on submit request 45247 from user mtomaschewski

OBS-URL: https://build.opensuse.org/request/show/45247
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dhcp?expand=0&rev=39
This commit is contained in:
OBS User autobuild 2010-08-10 10:21:53 +00:00 committed by Git OBS Bridge
commit 5fe9848db7
5 changed files with 84 additions and 12 deletions

View File

@ -78,7 +78,7 @@ netconfig_modify() {
(new_network_number) k='NETWORK' ;;
(new_broadcast_address) k='BROADCAST' ;;
(new_interface_mtu) k='MTU' ;;
(new_rfc3442_classless_static_routes)
(new_rfc3442_classless_static_routes_formatted)
k='ROUTES' ;;
# (new_static_routes) k='ROUTES' ;;
(new_routers) k='GATEWAYS' ;;
@ -195,9 +195,9 @@ set_ipv4_route()
}
get_ipv4_default_gw()
{
if [ "x$new_rfc3442_classless_static_routes" != x ] ; then
if [ "x$new_rfc3442_classless_static_routes_formatted" != x ] ; then
local r route=() gw=()
for r in $new_rfc3442_classless_static_routes ; do
for r in $new_rfc3442_classless_static_routes_formatted ; do
route=(${r//,/ })
case ${route[0]}/${route[1]} in
0.0.0.0/0.0.0.0)
@ -213,10 +213,10 @@ get_ipv4_default_gw()
}
set_ipv4_routes()
{
if [ "x$new_rfc3442_classless_static_routes" != x ] ; then
if [ "x$new_rfc3442_classless_static_routes_formatted" != x ] ; then
local r route=()
# TODO: multiple gw's to one dest as in $new_routers?
for r in $new_rfc3442_classless_static_routes ; do
for r in $new_rfc3442_classless_static_routes_formatted ; do
route=(${r//,/ })
case ${route[0]}/${route[1]} in
0.0.0.0/0.0.0.0)
@ -323,12 +323,12 @@ dhclient)
'^[[:space:]]*DHCLIENT_SET_\(HOSTNAME\|DEFAULT_ROUTE\)=' \
"$SYSCONFIG_CFG_DIR/dhcp" 2>/dev/null`
fi
if [ "x$new_rfc3442_classless_static_routes_raw" != x ] ; then
new_rfc3442_classless_static_routes=$(
parse_ipv4_classless_routes $new_rfc3442_classless_static_routes_raw
if [ "x$new_rfc3442_classless_static_routes" != x ] ; then
new_rfc3442_classless_static_routes_formatted=$(
parse_ipv4_classless_routes $new_rfc3442_classless_static_routes
)
else
unset new_rfc3442_classless_static_routes
unset new_rfc3442_classless_static_routes_formatted
fi
if [ x$new_broadcast_address != x ] ; then
new_broadcast_arg="brd $new_broadcast_address"

View File

@ -30,11 +30,11 @@
#
# define classless static route option
#
option rfc3442-classless-static-routes_raw code 121 = array of unsigned integer 8;
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
# Request several well known/usefull dhcp options.
request subnet-mask, broadcast-address, routers,
rfc3442-classless-static-routes_raw,
rfc3442-classless-static-routes,
interface-mtu, host-name, domain-name,
domain-name-servers, nis-domain, nis-servers,
nds-context, nds-servers, nds-tree-name,

View File

@ -0,0 +1,57 @@
From 68249388d6974933059023eea4cf750688e8a11d Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <mt@suse.de>
Date: Tue, 27 Jul 2010 15:27:28 +0200
Subject: [PATCH] Fixed ldap option numbers conflict
diff --git dhcp/includes/dhcpd.h dhcp/includes/dhcpd.h
index 6792497..95c2786 100644
--- dhcp/includes/dhcpd.h
+++ dhcp/includes/dhcpd.h
@@ -677,25 +677,25 @@ struct lease_state {
#endif
#if defined(LDAP_CONFIGURATION)
-# define SV_LDAP_SERVER 57
-# define SV_LDAP_PORT 58
-# define SV_LDAP_USERNAME 59
-# define SV_LDAP_PASSWORD 60
-# define SV_LDAP_BASE_DN 61
-# define SV_LDAP_METHOD 62
-# define SV_LDAP_DEBUG_FILE 63
-# define SV_LDAP_DHCP_SERVER_CN 64
-# define SV_LDAP_REFERRALS 65
+# define SV_LDAP_SERVER 60
+# define SV_LDAP_PORT 61
+# define SV_LDAP_USERNAME 62
+# define SV_LDAP_PASSWORD 63
+# define SV_LDAP_BASE_DN 64
+# define SV_LDAP_METHOD 65
+# define SV_LDAP_DEBUG_FILE 66
+# define SV_LDAP_DHCP_SERVER_CN 67
+# define SV_LDAP_REFERRALS 68
#if defined (USE_SSL)
-# define SV_LDAP_SSL 66
-# define SV_LDAP_TLS_REQCERT 67
-# define SV_LDAP_TLS_CA_FILE 68
-# define SV_LDAP_TLS_CA_DIR 69
-# define SV_LDAP_TLS_CERT 70
-# define SV_LDAP_TLS_KEY 71
-# define SV_LDAP_TLS_CRLCHECK 72
-# define SV_LDAP_TLS_CIPHERS 73
-# define SV_LDAP_TLS_RANDFILE 74
+# define SV_LDAP_SSL 69
+# define SV_LDAP_TLS_REQCERT 70
+# define SV_LDAP_TLS_CA_FILE 71
+# define SV_LDAP_TLS_CA_DIR 72
+# define SV_LDAP_TLS_CERT 73
+# define SV_LDAP_TLS_KEY 74
+# define SV_LDAP_TLS_CRLCHECK 75
+# define SV_LDAP_TLS_CIPHERS 76
+# define SV_LDAP_TLS_RANDFILE 77
#endif
#endif
--
1.7.1

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Wed Aug 4 12:52:03 UTC 2010 - mt@suse.de
- Renamed rfc3442-classless-static-routes_raw in /etc/dhclient.conf
to rfc3442-classless-static-routes for compatibility with the
NetworkManager making use of /etc/dhclient.conf now and adopted
/sbin/dhclient-script (bnc#625770).
-------------------------------------------------------------------
Tue Jul 27 13:31:09 UTC 2010 - mt@suse.de
- Fixed ldap option number conflicting with new options (bnc#625358)
-------------------------------------------------------------------
Fri Jul 2 10:48:21 UTC 2010 - mt@suse.de

View File

@ -33,7 +33,7 @@ License: BSD3c(or similar)
Group: Productivity/Networking/Boot/Servers
AutoReqProv: on
Version: 4.1.1.P1
Release: 2
Release: 6
Summary: Common Files Used by ISC DHCP Software
Url: http://www.isc.org/software/dhcp
Source0: dhcp-%{isc_version}.tar.bz2
@ -78,6 +78,7 @@ Patch21: dhcp-4.1.1-dhclient-send-hostname-rml.diff
## patch lives here: http://www.suse.de/~mt/git/dhcp-ldap.git/
%if 0%{?with_ldap:1}
Patch30: dhcp-4.1.1-ldap-patch-mt-01.diff.bz2
Patch31: dhcp-4.1.1-ldap-patch-mt-01_option-numbers.diff
%else
Patch30: dhcp-4.1.1-dhclient-no-libcrypto.diff
%endif
@ -201,6 +202,7 @@ Authors:
%patch21 -p1
%if 0%{?with_ldap:%with_ldap}
%patch30 -p1
%patch31 -p1
%else
%patch30 -p1
%endif