SHA256
1
0
forked from pool/dhcp
OBS User autobuild 2009-12-16 15:52:02 +00:00 committed by Git OBS Bridge
parent b0fba699b0
commit 429c7df13b
11 changed files with 215 additions and 323 deletions

View File

@ -0,0 +1,11 @@
--- server/dhcp.c
+++ server/dhcp.c 2009/07/09 16:05:43
@@ -1747,6 +1747,8 @@ void ack_lease (packet, lease, offer, wh
host_reference (&host, h, MDL);
}
if (!host) {
+ if (hp)
+ host_dereference (&hp, MDL);
find_hosts_by_haddr (&hp,
packet -> raw -> htype,
packet -> raw -> chaddr,

View File

@ -1,6 +1,6 @@
--- client/dhclient-script.8
+++ client/dhclient-script.8 2009/10/16 08:10:52
@@ -45,9 +45,10 @@ any, and also called once if no valid le
+++ client/dhclient-script.8 2009/05/04 09:54:05
@@ -45,9 +45,10 @@
This script is not meant to be customized by the end user. If local
customizations are needed, they should be possible using the enter and
exit hooks provided (see HOOKS for details). These hooks will allow the
@ -13,7 +13,7 @@
.PP
No standard client script exists for some operating systems, even though
the actual client may work, so a pioneering user may well need to create
@@ -59,12 +60,43 @@ customizing
@@ -59,12 +60,43 @@
.B ETCDIR/dhclient.conf
or using the enter and exit hooks, please submit a bug report.
.SH HOOKS
@ -62,7 +62,7 @@
.PP
On after defining the make_resolv_conf function, the client script checks
for the presence of an executable
@@ -221,7 +253,7 @@ valid, this shouldn't cause any real pro
@@ -221,7 +253,7 @@
confusing.
.SH SEE ALSO
dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
@ -72,8 +72,8 @@
.B dhclient-script(8)
has been written for Internet Systems Consortium
--- client/scripts/linux
+++ client/scripts/linux 2009/10/16 08:16:11
@@ -22,25 +22,183 @@
+++ client/scripts/linux 2009/05/04 10:01:50
@@ -22,25 +22,97 @@
# 4. TIMEOUT not tested. ping has a flag I don't know, and I'm suspicious
# of the $1 in its args.
@ -117,7 +117,6 @@
+ # (new_static_routes) k='ROUTES' ;;
+ (new_routers) k='GATEWAYS' ;;
+ (new_host_name) k='HOSTNAME' ;;
+ (new_domain_search) k='DNSSEARCH' ;;
+ (new_domain_name) k='DNSDOMAIN' ;;
+ (new_domain_name_servers) k='DNSSERVERS' ;;
+ (new_ntp_servers) k='NTPSERVERS' ;;
@ -143,48 +142,158 @@
+ /sbin/netconfig remove -s "dhclient3" -i "$interface" </dev/null
+ fi
+}
+set_default_gw_route()
+
make_resolv_conf() {
+ ###
+ ### note: this function is never used
+ ### it creates /var/lib/dhcp/resolv.conf.dhclient.$interface only
+ ###
if [ x"$new_domain_name_servers" != x ]; then
- cat /dev/null > /etc/resolv.conf.dhclient
- chmod 644 /etc/resolv.conf.dhclient
+ cat /dev/null > /var/lib/dhcp/resolv.conf.dhclient.$interface
+ chmod 644 /var/lib/dhcp/resolv.conf.dhclient.$interface
if [ x"$new_domain_search" != x ]; then
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
+ echo search $new_domain_search >> /var/lib/dhcp/resolv.conf.dhclient.$interface
elif [ x"$new_domain_name" != x ]; then
# Note that the DHCP 'Domain Name Option' is really just a domain
# name, and that this practice of using the domain name option as
# a search path is both nonstandard and deprecated.
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
+ echo search $new_domain_name >> /var/lib/dhcp/resolv.conf.dhclient.$interface
fi
for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
+ echo nameserver $nameserver >> /var/lib/dhcp/resolv.conf.dhclient.$interface
done
-
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
fi
}
+restore_resolv_conf()
+{
+ if test -f /etc/sysconfig/network/ifcfg-${interface} -o \
+ -f /dev/shm/sysconfig/if-${interface} ;
+ then
+ if grep -qs '^primary=yes' /dev/shm/sysconfig/if-${interface} 2>/dev/null ;
+ rm -f /var/lib/dhcp/resolv.conf.dhclient.$interface
+}
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
exit_with_hooks() {
@@ -83,6 +155,10 @@
if [ x$alias_subnet_mask != x ]; then
alias_subnet_arg="netmask $alias_subnet_mask"
fi
+if [ $(($new_interface_mtu)) -lt 576 ] ; then
+ # 68 is the minimal legal value, but 576 the real life minimum
+ unset new_interface_mtu
+fi
if [ x$reason = xMEDIUM ]; then
# Linux doesn't do mediums (ok, ok, media).
@@ -97,7 +173,7 @@
if [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] )
then
ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
- broadcast 255.255.255.255 up
+ broadcast 255.255.255.255 up
# Add route to make broadcast work. Do not omit netmask.
route add default dev $interface netmask 0.0.0.0
else
@@ -116,47 +192,117 @@
if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
[ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
- current_hostname=`hostname`
- if [ x$current_hostname = x ] || \
- [ x$current_hostname = x$old_host_name ]; then
- if [ x$current_hostname = x ] || \
- [ x$new_host_name != x$old_host_name ]; then
- hostname $new_host_name
- fi
- fi
-
if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
- [ x$alias_ip_address != x$old_ip_address ]; then
+ [ x$alias_ip_address != x$old_ip_address ]; then
# Possible new alias. Remove old alias.
ifconfig $interface:0- inet 0
fi
if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
# IP address changed. Bringing down the interface will delete all routes,
# and clear the ARP cache.
- ifconfig $interface inet 0 down
+ ifconfig $interface inet 0
fi
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
ifconfig $interface inet $new_ip_address $new_subnet_arg \
- $new_broadcast_arg
+ $new_broadcast_arg \
+ ${new_interface_mtu:+mtu "$new_interface_mtu"}
# Add a network route to the computed network address.
if [ $relmajor -lt 2 ] || \
- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
+ ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
route add -net $new_network_number $new_subnet_arg dev $interface
fi
- for router in $new_routers; do
- route add default gw $router
- done
+
+ if test -f /etc/sysconfig/network/ifcfg-${interface} -o \
+ -f /dev/shm/sysconfig/if-${interface} ;
+ then
+ eval `grep --no-filename '^[[:space:]]*DHCLIENT_SET_DEFAULT_ROUTE=' \
+ /etc/sysconfig/network/dhcp
+ /etc/sysconfig/network/ifcfg-${interface} 2>/dev/null`
+ if grep -qs '^primary=yes' /dev/shm/sysconfig/if-${interface} 2>/dev/null ;
+ then
+ eval `grep --no-filename '^[[:space:]]*DHCLIENT_SET_DEFAULT_ROUTE=' \
+ /etc/sysconfig/network/dhcp
+ /etc/sysconfig/network/ifcfg-${interface} 2>/dev/null`
+ else
+ eval `grep --no-filename '^[[:space:]]*DHCLIENT_SET_DEFAULT_ROUTE=' \
+ /etc/sysconfig/network/ifcfg-${interface} 2>/dev/null`
+ fi
+ else
+ eval `grep --no-filename '^[[:space:]]*DHCLIENT_SET_DEFAULT_ROUTE=' \
+ /etc/sysconfig/network/ifcfg-${interface} 2>/dev/null`
+ /etc/sysconfig/network/dhcp 2>/dev/null`
+ fi
+ if [ "$DHCLIENT_SET_DEFAULT_ROUTE" = yes ] ; then
+ for router in $new_routers; do
+ err=`route add default gw $router 2>&1` && break || \
+ case "$err" in
+ SIOCADDRT:*)
+ # The gateway seems to be not reachable via local network
+ # route (implicitely created by ifconfig based on the IP
+ # an netmask provided by dhcp).
+ # Check this, set an explicit host route to the gateway
+ # over the current interface and try again (bnc#266215).
+ matches=$(test -x /sbin/ip && \
+ /sbin/ip -f inet -o route list match $router | \
+ grep -v ^default | grep -c -v "^$" 2>/dev/null)
+ if test -n "$matches" -a $(($matches)) -eq 0 ; then
+ route add -host $router dev $interface && \
+ route add default gw $router && break
+ fi
+ ;;
+ esac
+ done
+ fi
fi
+
if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
then
ifconfig $interface:0- inet 0
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
route add -host $alias_ip_address $interface:0
fi
- make_resolv_conf
+
+ if use_netconfig ; then
+ netconfig_modify
+ else
+ eval `grep --no-filename '^[[:space:]]*DHCLIENT_SET_DEFAULT_ROUTE=' \
+ /etc/sysconfig/network/dhcp 2>/dev/null`
+ make_resolv_conf
+ fi
+ if [ "$DHCLIENT_SET_DEFAULT_ROUTE" = yes ] ; then
+ for router in $new_routers; do
+ err=`route add default gw $router $metric_arg dev $interface 2>&1` && break || \
+ case "$err" in
+ SIOCADDRT:*)
+ # The gateway seems to be not reachable via local network
+ # route (implicitely created by ifconfig based on the IP
+ # an netmask provided by dhcp).
+ # Check this, set an explicit host route to the gateway
+ # over the current interface and try again (bnc#266215).
+ matches=$(test -x /sbin/ip && \
+ /sbin/ip -f inet -o route list match $router | \
+ grep -v ^default | grep -c -v "^$" 2>/dev/null)
+ if test -n "$matches" -a $(($matches)) -eq 0 ; then
+ route add -host $router dev $interface && \
+ route add default gw $router $metric_arg dev $interface && break
+ fi
+ ;;
+ esac
+ done
+ fi
+}
+set_hostname()
+{
+
+ if test -f /etc/sysconfig/network/ifcfg-${interface} -o \
+ -f /dev/shm/sysconfig/if-${interface} ;
+ then
@ -203,9 +312,7 @@
+ fi
+ if [ "$DHCLIENT_SET_HOSTNAME" = yes ] ; then
+ current_hostname=`hostname`
+ if [ "x${current_hostname%%.*}" = "x" ] || \
+ [ "x${current_hostname%%.*}" = "x(none)" ] || \
+ [ "x${current_hostname%%.*}" = "xlocalhost" ] || \
+ if [ "x${current_hostname%%.*}" = x ] || \
+ [ "x${current_hostname%%.*}" != "x${new_host_name%%.*}" ]; then
+
+ if [ "x${new_host_name%%.*}" != x ]; then
@ -222,117 +329,11 @@
+ fi
+ fi
+ fi
+}
+
+resolv_conf_dhclient="/var/lib/dhcp/resolv.conf.dhclient.$interface"
make_resolv_conf() {
+ ###
+ ### note: this function is never used by default
+ ### and it has been modified to create the
+ ### /var/lib/dhcp/resolv.conf.dhclient.$interface
+ ### file instead /etc/resolv.conf.
+ ###
if [ x"$new_domain_name_servers" != x ]; then
- cat /dev/null > /etc/resolv.conf.dhclient
- chmod 644 /etc/resolv.conf.dhclient
+ cat /dev/null > "$resolv_conf_dhclient"
+ chmod 644 "$resolv_conf_dhclient"
if [ x"$new_domain_search" != x ]; then
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
+ echo search $new_domain_search >> "$resolv_conf_dhclient"
elif [ x"$new_domain_name" != x ]; then
# Note that the DHCP 'Domain Name Option' is really just a domain
# name, and that this practice of using the domain name option as
# a search path is both nonstandard and deprecated.
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
+ echo search $new_domain_name >> "$resolv_conf_dhclient"
fi
for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
+ echo nameserver $nameserver >> "$resolv_conf_dhclient"
done
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
+ ### mv /etc/resolv.conf.dhclient /etc/resolv.conf
fi
}
+restore_resolv_conf()
+{
+ rm -f "$resolv_conf_dhclient"
+}
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
exit_with_hooks() {
@@ -84,7 +242,12 @@ if [ x$alias_subnet_mask != x ]; then
alias_subnet_arg="netmask $alias_subnet_mask"
fi
if [ x$new_interface_mtu != x ]; then
- mtu_arg="mtu $new_interface_mtu"
+ if [ $(( $new_interface_mtu )) -lt 576 ] ; then
+ # 68 is the minimal legal value, but 576 the real life minimum
+ unset new_interface_mtu
+ else
+ mtu_arg="mtu $new_interface_mtu"
+ fi
fi
if [ x$IF_METRIC != x ]; then
metric_arg="metric $IF_METRIC"
@@ -122,15 +285,6 @@ fi
if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
[ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
- current_hostname=`hostname`
- if [ x$current_hostname = x ] || \
- [ x$current_hostname = "x(none)" ] || \
- [ x$current_hostname = xlocalhost ] || \
- [ x$current_hostname = x$old_host_name ]; then
- if [ x$new_host_name != x$old_host_name ]; then
- hostname "$new_host_name"
- fi
- fi
if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
[ x$alias_ip_address != x$old_ip_address ]; then
@@ -140,7 +294,7 @@ if [ x$reason = xBOUND ] || [ x$reason =
if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
# IP address changed. Bringing down the interface will delete all routes,
# and clear the ARP cache.
- ifconfig $interface inet 0 down
+ ifconfig $interface inet 0
fi
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
@@ -153,17 +307,25 @@ if [ x$reason = xBOUND ] || [ x$reason =
( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
route add -net $new_network_number $new_subnet_arg dev $interface
fi
- for router in $new_routers; do
- route add default gw $router $metric_arg dev $interface
- done
+
+ set_default_gw_route
fi
+
if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
then
ifconfig $interface:0- inet 0
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
route add -host $alias_ip_address $interface:0
fi
- make_resolv_conf
+
+ if use_netconfig ; then
+ netconfig_modify
+ else
+ make_resolv_conf
+ fi
+
+ set_hostname
+
exit_with_hooks 0
fi
@@ -175,7 +337,7 @@ if [ x$reason = xEXPIRE ] || [ x$reason
@@ -168,7 +314,7 @@
fi
if [ x$old_ip_address != x ]; then
# Shut down interface, which will delete routes and clear arp cache.
@ -341,32 +342,35 @@
fi
if [ x$alias_ip_address != x ]; then
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
@@ -190,7 +352,7 @@ if [ x$reason = xTIMEOUT ]; then
@@ -182,27 +328,37 @@
ifconfig $interface:0- inet 0
fi
ifconfig $interface inet $new_ip_address $new_subnet_arg \
$new_broadcast_arg $mtu_arg
- set $new_routers
+ set -- $new_routers
- $new_broadcast_arg
+ $new_broadcast_arg
set $new_routers
############## what is -w in ping?
if ping -q -c 1 $1; then
if [ x$new_ip_address != x$alias_ip_address ] && \
[ x$alias_ip_address != x ]; then
@@ -201,14 +363,25 @@ if [ x$reason = xTIMEOUT ]; then
( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
- [ x$alias_ip_address != x ]; then
+ [ x$alias_ip_address != x ]; then
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
route add -host $alias_ip_address dev $interface:0
fi
if [ $relmajor -lt 2 ] || \
- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
+ ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
route add -net $new_network_number
fi
- for router in $new_routers; do
- route add default gw $router $metric_arg dev $interface
- done
for router in $new_routers; do
route add default gw $router
done
- make_resolv_conf
+
+ set_default_gw_route
+
+ if use_netconfig ; then
+ netconfig_modify
+ else
+ make_resolv_conf
+ fi
+
exit_with_hooks 0
fi
- ifconfig $interface inet 0 down

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:72e33343024119c546af849ac63e150f71a62fc56bd4ab80bff118f710ac9f7e
size 44861

3
dhcp-3.1.2p1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e0cb405e0fef0ecebec7aaed294032a06178ff28be87498596e6069ccda4341e
size 792355

11
dhcp-3.1.2p1.tar.gz.asc Normal file
View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)
iQEVAwUASj/23dgRtT8Le64AAQLfFAgAjKwtGHGpS9Jw5nEhqkiXUq6E+WPxAVAl
u59q6XS186MwbfZuOreTJBmh2MrD/EKqb642AJr6kZpw/EfuB4Bisd1iyqixH8pX
hQsmmpGis4QkPIBkEW6ktGEayeVEUE5r5PEmDvXEEs6kTxmMjOk5ZUpy3lsN2ZYN
OitmOTU4TbHyFyWVwRKWsRvozJrPvwMmMGEyNWcGKFF8O8ogJ5iWQAqaMWiRN8a0
q+8/lU3IbT+ZUK8agFK28rohNsoSto41ABEcjG+xRY8YQDJVVJ+NJuzxnjB5ns/W
ELiEZhnJ+m8jyze0yR2qNlunudg2FBKIK8z4YVTUQvF0q0r99kAkig==
=BJvL
-----END PGP SIGNATURE-----

View File

@ -1,13 +0,0 @@
--- client/dhclient.conf
+++ client/dhclient.conf 2009/12/14 21:31:00
@@ -22,7 +22,9 @@
#
#####################################################
-send dhcp-lease-time 3600;
+# uncomment to request a specific lease time, otherwise
+# the dhcp server will provide its default lease time:
+#send dhcp-lease-time 3600;
# Request several well known/usefull dhcp options.
request subnet-mask, broadcast-address, routers,

View File

@ -1,73 +0,0 @@
--- client/scripts/linux
+++ client/scripts/linux 2009/12/14 22:29:11
@@ -28,7 +28,11 @@
# logs entire run of dhclient-script to /var/log/dhclient-script,
# if DHCLIENT_DEBUG is set in sysconfig/network/dhcp
#
-eval `grep "^DHCLIENT_DEBUG=" /etc/sysconfig/network/dhcp 2>/dev/null`
+SYSCONFIG_CFG_DIR="/etc/sysconfig/network"
+SYSCONFIG_RUN_DIR=`. "$SYSCONFIG_CFG_DIR/scripts/functions" \
+ 2>/dev/null && echo "$RUN_FILES_BASE"`
+SYSCONFIG_RUN_DIR=${SYSCONFIG_RUN_DIR:-/dev/.sysconfig/network}
+eval `grep "^DHCLIENT_DEBUG=" "$SYSCONFIG_CFG_DIR/dhcp" 2>/dev/null`
if [ "$DHCLIENT_DEBUG" = yes ]; then
set -a # allexport
(
@@ -90,21 +94,21 @@ netconfig_remove() {
}
set_default_gw_route()
{
- if test -f /etc/sysconfig/network/ifcfg-${interface} -o \
- -f /dev/shm/sysconfig/if-${interface} ;
+ if test -f "$SYSCONFIG_CFG_DIR/ifcfg-${interface}" -o \
+ -f "$SYSCONFIG_RUN_DIR/if-${interface}" ;
then
- if grep -qs '^primary=yes' /dev/shm/sysconfig/if-${interface} 2>/dev/null ;
+ if grep -qs '^primary=yes' "$SYSCONFIG_RUN_DIR/if-${interface}" 2>/dev/null ;
then
eval `grep --no-filename '^[[:space:]]*DHCLIENT_SET_DEFAULT_ROUTE=' \
- /etc/sysconfig/network/dhcp
- /etc/sysconfig/network/ifcfg-${interface} 2>/dev/null`
+ "$SYSCONFIG_CFG_DIR/dhcp"
+ "$SYSCONFIG_CFG_DIR/ifcfg-${interface}" 2>/dev/null`
else
eval `grep --no-filename '^[[:space:]]*DHCLIENT_SET_DEFAULT_ROUTE=' \
- /etc/sysconfig/network/ifcfg-${interface} 2>/dev/null`
+ "$SYSCONFIG_CFG_DIR/ifcfg-${interface}" 2>/dev/null`
fi
else
eval `grep --no-filename '^[[:space:]]*DHCLIENT_SET_DEFAULT_ROUTE=' \
- /etc/sysconfig/network/dhcp 2>/dev/null`
+ "$SYSCONFIG_CFG_DIR/dhcp" 2>/dev/null`
fi
if [ "$DHCLIENT_SET_DEFAULT_ROUTE" = yes ] ; then
for router in $new_routers; do
@@ -130,21 +134,21 @@ set_default_gw_route()
}
set_hostname()
{
- if test -f /etc/sysconfig/network/ifcfg-${interface} -o \
- -f /dev/shm/sysconfig/if-${interface} ;
+ if test -f "$SYSCONFIG_CFG_DIR/ifcfg-${interface}" -o \
+ -f "$SYSCONFIG_RUN_DIR/if-${interface}" ;
then
- if grep -qs '^primary=yes' /dev/shm/sysconfig/if-${interface} 2>/dev/null ;
+ if grep -qs '^primary=yes' "$SYSCONFIG_RUN_DIR/if-${interface}" 2>/dev/null ;
then
eval `grep --no-filename "^[[:space:]]*DHCLIENT_SET_HOSTNAME=" \
- /etc/sysconfig/network/dhcp
- /etc/sysconfig/network/ifcfg-${interface} 2>/dev/null`
+ "$SYSCONFIG_CFG_DIR/dhcp"
+ "$SYSCONFIG_CFG_DIR/ifcfg-${interface}" 2>/dev/null`
else
eval `grep --no-filename "^[[:space:]]*DHCLIENT_SET_HOSTNAME=" \
- /etc/sysconfig/network/ifcfg-${interface} 2>/dev/null`
+ "$SYSCONFIG_CFG_DIR/ifcfg-${interface}" 2>/dev/null`
fi
else
eval `grep --no-filename "^[[:space:]]*DHCLIENT_SET_HOSTNAME=" \
- /etc/sysconfig/network/dhcp 2>/dev/null`
+ "$SYSCONFIG_CFG_DIR/dhcp" 2>/dev/null`
fi
if [ "$DHCLIENT_SET_HOSTNAME" = yes ] ; then
current_hostname=`hostname`

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9d652eebb6a2d447fbc85635bb6c64211434c2dd9ec4862017d69871e5dc20f0
size 44910

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0010cbf3c63f33226ba7070ec108101d2760b2b2cf1313b41a10b45542256b8e
size 633520

View File

@ -1,49 +1,3 @@
-------------------------------------------------------------------
Mon Dec 14 22:39:01 CET 2009 - mt@suse.de
- Fixed dhclient-script to use correct sysconfig run dir path
to not to break the defaultroute/hostname setup (bnc#555095).
- Don't request any specific lease-time by default (bnc#516459).
-------------------------------------------------------------------
Fri Oct 16 10:17:23 CEST 2009 - mt@suse.de
- Fixed dhclient-script to forward new_domain_search as DNSSEARCH
to netconfig.
-------------------------------------------------------------------
Tue Oct 13 22:51:49 CEST 2009 - mt@suse.de
- Updated to dhcp-3.1.3 maintenance release fixing several issues
(a digest, see RELNOTES for the complete list):
* Remove infinite loop in token_print_indent_concat().
* A parser bug was fixed that segfaulted if site-option-space
was tried to be used interchangeably with vendor-option-space.
* Two uninitialized stack structures are now memset to zero,
thanks to patch from David Cantrell at Red Hat.
* Memory leak in the load_balance_mine() function is fixed. This
would leak ~20-30 octets per DHCPDISCOVER packet while failover
was in use and in normal state.
* Fixed setting hostname in Linux hosts that require hostname
argument to be double-quoted. Also allow server-provided
hostname to override hostnames 'localhost' and '(none)'.
* Added client support for setting interface MTU and metric,
thanks to Roy "UberLord" Marples <roy@marples.name>.
* Fixed failover reconnection retry code to continue to retry to
reconnect rather than restarting the listener.
* Fixed a bug where an OMAPI socket disconnection message would
not result in scheduling a failover reconnection, if the link
had not negotiated a failover connect yet (e.g.: connection
refused, asynch socket connect() timeouts).
* Versions 3.0.x syntax with multiple name->code option
definitions is now supported. Note that, similarly to 3.0.x,
for by-code lookups only the last option definition is used.
* Fixed a fenceposting bug when a client had two host records
configured, one using 'uid' and the other using 'hardware
ethernet'. CVE-2009-1892
- Updated to dhcp-3.1.3-ldap-patch-mt-01 including previous fixes.
- Merged dhclient script, removed obsolete CVE-2009-1892 fix.
-------------------------------------------------------------------
Tue Sep 29 11:37:18 CEST 2009 - mt@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package dhcp (Version 3.1.3)
# spec file for package dhcp (Version 3.1.2p1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -27,16 +27,15 @@ Name: dhcp
BuildRequires: CASA-devel
%endif
BuildRequires: dos2unix openldap2-devel
License: BSD 3-Clause
License: BSD 3-clause (or similar)
Group: Productivity/Networking/Boot/Servers
AutoReqProv: on
Version: 3.1.3
Release: 0.<RELEASE1>
Version: 3.1.2p1
Release: 3
Summary: Common Files Used by ISC DHCP Software
Url: http://www.isc.org/isc/dhcp.html
Source0: dhcp-%{version}.tar.bz2
#Source0: http://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz
#Source1: http://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz.asc
Source0: http://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz
Source1: http://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz.asc
Source2: rc.dhcpd
Source3: rc.dhcrelay
Source11: sysconfig.dhcpd
@ -69,7 +68,7 @@ Patch4: dhcp-3.1.1-tmpfile.dif
## patch lives here: http://www.suse.de/~mt/git/dhcp-ldap.git/
%define DHCPD_LDAP 1
%if %DHCPD_LDAP
Patch10: dhcp-3.1.3-ldap-patch-mt-01.diff.bz2
Patch10: dhcp-3.1.2p1-ldap-patch-mt-02.diff.bz2
%endif
%if %{?suse_version:%suse_version}%{?!suse_version:99999} > 930
Patch30: dhcp-3.1.1-pie.dif
@ -78,17 +77,16 @@ Patch40: dhcp-3.1.1-dhclient-exec-filedes.dif
Patch41: dhcp-3.1.1-dhclient-send-hostname-rml.dif
Patch42: dhcp-3.1.1-dhclient-use-script-cmdline.dif
Patch50: dhcp-3.1.1-dhclient-conf.dif
Patch51: dhcp-3.1.3-dhclient-conf.bnc516459.dif
Patch60: dhcp-3.1.3-dhclient-script.dif
Patch61: dhcp-3.1.3-dhclient-script.bnc555095.dif
Patch60: dhcp-3.1.2-dhclient-script.dif
##
Patch70: dhcp-3.1.1-CVE-2009-1892.bnc519413.dif
Obsoletes: dhcp-base
Provides: dhcp-base:/usr/bin/omshell
PreReq: /bin/touch /sbin/chkconfig sysconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%package server
License: BSD 3-Clause
License: BSD 3-clause (or similar)
Summary: ISC DHCP Server
Group: Productivity/Networking/Boot/Servers
Requires: net-tools dhcp
@ -97,7 +95,7 @@ Provides: dhcp_server dhcp:/usr/sbin/dhcpd
AutoReqProv: on
%package client
License: BSD 3-Clause
License: BSD 3-clause (or similar)
Summary: ISC DHCP Client
Group: Productivity/Networking/Boot/Clients
Requires: net-tools dhcp /usr/bin/host
@ -107,7 +105,7 @@ Obsoletes: dhclient
AutoReqProv: on
%package relay
License: BSD 3-Clause; "http://www.isc.org/products/DHCP/dhcp-copyright.html: ..."
License: BSD 3-clause (or similar)
Summary: DHCP Relay Agent
Group: Productivity/Networking/Boot/Servers
Requires: net-tools dhcp
@ -117,7 +115,7 @@ Obsoletes: dhcrelay
AutoReqProv: on
%package devel
License: BSD 3-Clause; "http://www.isc.org/products/DHCP/dhcp-copyright.html: ..."
License: BSD 3-clause (or similar)
Summary: Header Files and Libraries for dhcpctl API
Group: Development/Libraries/C and C++
Requires: dhcp = %{version}
@ -205,9 +203,8 @@ Authors:
%patch41 -p0
%patch42 -p0
%patch50 -p0
%patch51 -p0
%patch60 -p0
%patch61 -p0
%patch70 -p0
##
find . -type f -name \*.cat\* -exec rm -f {} \;
cp -p %{S:2} %{S:3} %{S:11} %{S:12} %{S:14} %{S:32} %{S:33} .
@ -222,7 +219,7 @@ dos2unix contrib/ms2isc/*
%build
export CFLAGS
CFLAGS="$RPM_OPT_FLAGS -W -Wall -fno-strict-aliasing -Wno-unused -DLDAP_DEPRECATED -DUSE_SSL -DPARANOIA -DHAVE_INET_PTON -DHAVE_INET_NTOP"
CFLAGS="$RPM_OPT_FLAGS -W -Wall -fno-strict-aliasing -Wno-unused -DLDAP_DEPRECATED -DUSE_SSL -DPARANOIA"
%if 0%{?with_casa:%with_casa}
CFLAGS="$CFLAGS -DLDAP_CASA_AUTH"
%endif
@ -417,7 +414,7 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi
%dir /var/lib/dhcp
%doc %{_mandir}/man1/omshell.1.gz
%doc %{_mandir}/man5/dhcp-eval.5.gz
%config %{susefw2dir}/dhcp-server
%{susefw2dir}/dhcp-server
%files server
%defattr(-,root,root)
@ -483,6 +480,7 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi
%defattr(-,root,root)
%_libdir/lib*
%{_prefix}/include/*
%doc %{_mandir}/man3/omshell.3.gz
%doc %{_mandir}/man3/omapi.3.gz
%doc %{_mandir}/man3/dhcpctl.3.gz