Hello community,
here is the log from the commit of package dhcp for openSUSE:Factory
checked in at Wed Dec 16 16:52:00 CET 2009.
--------
--- dhcp/dhcp.changes 2009-09-29 11:45:19.000000000 +0200
+++ /mounts/work_src_done/STABLE/dhcp/dhcp.changes 2009-12-16 14:12:27.000000000 +0100
@@ -1,0 +2,46 @@
+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 .
+ * 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.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
dhcp-3.1.1-CVE-2009-1892.bnc519413.dif
dhcp-3.1.2-dhclient-script.dif
dhcp-3.1.2p1-ldap-patch-mt-02.diff.bz2
dhcp-3.1.2p1.tar.gz
dhcp-3.1.2p1.tar.gz.asc
New:
----
dhcp-3.1.3-dhclient-conf.bnc516459.dif
dhcp-3.1.3-dhclient-script.bnc555095.dif
dhcp-3.1.3-dhclient-script.dif
dhcp-3.1.3-ldap-patch-mt-01.diff.bz2
dhcp-3.1.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dhcp.spec ++++++
--- /var/tmp/diff_new_pack.1YLPt6/_old 2009-12-16 16:51:32.000000000 +0100
+++ /var/tmp/diff_new_pack.1YLPt6/_new 2009-12-16 16:51:32.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package dhcp (Version 3.1.2p1)
+# spec file for package dhcp (Version 3.1.3)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -27,15 +27,16 @@
BuildRequires: CASA-devel
%endif
BuildRequires: dos2unix openldap2-devel
-License: BSD 3-clause (or similar)
+License: BSD3c
Group: Productivity/Networking/Boot/Servers
AutoReqProv: on
-Version: 3.1.2p1
-Release: 3
+Version: 3.1.3
+Release: 1
Summary: Common Files Used by ISC DHCP Software
Url: http://www.isc.org/isc/dhcp.html
-Source0: http://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz
-Source1: http://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz.asc
+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
Source2: rc.dhcpd
Source3: rc.dhcrelay
Source11: sysconfig.dhcpd
@@ -68,7 +69,7 @@
## patch lives here: http://www.suse.de/~mt/git/dhcp-ldap.git/
%define DHCPD_LDAP 1
%if %DHCPD_LDAP
-Patch10: dhcp-3.1.2p1-ldap-patch-mt-02.diff.bz2
+Patch10: dhcp-3.1.3-ldap-patch-mt-01.diff.bz2
%endif
%if %{?suse_version:%suse_version}%{?!suse_version:99999} > 930
Patch30: dhcp-3.1.1-pie.dif
@@ -77,16 +78,17 @@
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
-Patch60: dhcp-3.1.2-dhclient-script.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
##
-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 (or similar)
+License: BSD3c
Summary: ISC DHCP Server
Group: Productivity/Networking/Boot/Servers
Requires: net-tools dhcp
@@ -95,7 +97,7 @@
AutoReqProv: on
%package client
-License: BSD 3-clause (or similar)
+License: BSD3c
Summary: ISC DHCP Client
Group: Productivity/Networking/Boot/Clients
Requires: net-tools dhcp /usr/bin/host
@@ -105,7 +107,7 @@
AutoReqProv: on
%package relay
-License: BSD 3-clause (or similar)
+License: BSD3c ; "http://www.isc.org/products/DHCP/dhcp-copyright.html: ..."
Summary: DHCP Relay Agent
Group: Productivity/Networking/Boot/Servers
Requires: net-tools dhcp
@@ -115,7 +117,7 @@
AutoReqProv: on
%package devel
-License: BSD 3-clause (or similar)
+License: BSD3c ; "http://www.isc.org/products/DHCP/dhcp-copyright.html: ..."
Summary: Header Files and Libraries for dhcpctl API
Group: Development/Libraries/C and C++
Requires: dhcp = %{version}
@@ -203,8 +205,9 @@
%patch41 -p0
%patch42 -p0
%patch50 -p0
+%patch51 -p0
%patch60 -p0
-%patch70 -p0
+%patch61 -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} .
@@ -219,7 +222,7 @@
%build
export CFLAGS
-CFLAGS="$RPM_OPT_FLAGS -W -Wall -fno-strict-aliasing -Wno-unused -DLDAP_DEPRECATED -DUSE_SSL -DPARANOIA"
+CFLAGS="$RPM_OPT_FLAGS -W -Wall -fno-strict-aliasing -Wno-unused -DLDAP_DEPRECATED -DUSE_SSL -DPARANOIA -DHAVE_INET_PTON -DHAVE_INET_NTOP"
%if 0%{?with_casa:%with_casa}
CFLAGS="$CFLAGS -DLDAP_CASA_AUTH"
%endif
@@ -414,7 +417,7 @@
%dir /var/lib/dhcp
%doc %{_mandir}/man1/omshell.1.gz
%doc %{_mandir}/man5/dhcp-eval.5.gz
-%{susefw2dir}/dhcp-server
+%config %{susefw2dir}/dhcp-server
%files server
%defattr(-,root,root)
@@ -480,7 +483,6 @@
%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
++++++ dhcp-3.1.3-dhclient-conf.bnc516459.dif ++++++
--- 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,
++++++ dhcp-3.1.3-dhclient-script.bnc555095.dif ++++++
--- 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`
++++++ dhcp-3.1.2-dhclient-script.dif -> dhcp-3.1.3-dhclient-script.dif ++++++
--- dhcp/dhcp-3.1.2-dhclient-script.dif 2009-07-29 12:53:15.000000000 +0200
+++ /mounts/work_src_done/STABLE/dhcp/dhcp-3.1.3-dhclient-script.dif 2009-12-16 14:12:19.000000000 +0100
@@ -1,6 +1,6 @@
--- client/dhclient-script.8
-+++ client/dhclient-script.8 2009/05/04 09:54:05
-@@ -45,9 +45,10 @@
++++ client/dhclient-script.8 2009/10/16 08:10:52
+@@ -45,9 +45,10 @@ any, and also called once if no valid le
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 @@
+@@ -59,12 +60,43 @@ customizing
.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 @@
+@@ -221,7 +253,7 @@ valid, this shouldn't cause any real pro
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/05/04 10:01:50
-@@ -22,25 +22,97 @@
++++ client/scripts/linux 2009/10/16 08:16:11
+@@ -22,25 +22,183 @@
# 4. TIMEOUT not tested. ping has a flag I don't know, and I'm suspicious
# of the $1 in its args.
@@ -117,6 +117,7 @@
+ # (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' ;;
@@ -142,81 +143,157 @@
+ /sbin/netconfig remove -s "dhclient3" -i "$interface" /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/dhcp 2>/dev/null`
++ 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
++ if grep -qs '^primary=yes' /dev/shm/sysconfig/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`
++ else
++ eval `grep --no-filename "^[[:space:]]*DHCLIENT_SET_HOSTNAME=" \
++ /etc/sysconfig/network/ifcfg-${interface} 2>/dev/null`
++ fi
++ else
++ eval `grep --no-filename "^[[:space:]]*DHCLIENT_SET_HOSTNAME=" \
++ /etc/sysconfig/network/dhcp 2>/dev/null`
++ fi
++ if [ "$DHCLIENT_SET_HOSTNAME" = yes ] ; then
++ current_hostname=`hostname`
++ if [ "x${current_hostname%%.*}" = "x" ] || \
++ [ "x${current_hostname%%.*}" = "x(none)" ] || \
++ [ "x${current_hostname%%.*}" = "xlocalhost" ] || \
++ [ "x${current_hostname%%.*}" != "x${new_host_name%%.*}" ]; then
++
++ if [ "x${new_host_name%%.*}" != x ]; then
++ hostname "${new_host_name%%.*}"
++ else
++ if [ -x /usr/bin/host ] ; then
++ if out=`host -W 2 "$new_ip_address" 2>/dev/null` ; then
++ _hostname="`echo "$out" | sed 's:^.* ::; s:\..*::'`"
++ if [ "x${_hostname}" != x ]; then
++ hostname "${_hostname}"
++ fi
++ fi
++ fi
++ fi
++ fi
++ fi
++}
+
++resolv_conf_dhclient="/var/lib/dhcp/resolv.conf.dhclient.$interface"
make_resolv_conf() {
+ ###
-+ ### note: this function is never used
-+ ### it creates /var/lib/dhcp/resolv.conf.dhclient.$interface only
++ ### 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 > /var/lib/dhcp/resolv.conf.dhclient.$interface
-+ chmod 644 /var/lib/dhcp/resolv.conf.dhclient.$interface
++ 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 >> /var/lib/dhcp/resolv.conf.dhclient.$interface
++ 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 >> /var/lib/dhcp/resolv.conf.dhclient.$interface
++ 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 >> /var/lib/dhcp/resolv.conf.dhclient.$interface
++ 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 /var/lib/dhcp/resolv.conf.dhclient.$interface
++ rm -f "$resolv_conf_dhclient"
+}
# 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
+@@ -84,7 +242,12 @@ 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$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$current_hostname = x ] || \
-- [ x$new_host_name != x$old_host_name ]; then
-- hostname $new_host_name
+- 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
-+ [ x$alias_ip_address != x$old_ip_address ]; then
- # Possible new alias. Remove old alias.
- ifconfig $interface:0- inet 0
- fi
+ [ 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.
@@ -225,59 +302,15 @@
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
+@@ -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
+- route add default gw $router $metric_arg dev $interface
- done
+
-+ 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 ;
-+ 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/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
++ set_default_gw_route
fi
+
if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
@@ -294,46 +327,12 @@
+ make_resolv_conf
+ fi
+
-+ 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 ;
-+ then
-+ eval `grep --no-filename "^[[:space:]]*DHCLIENT_SET_HOSTNAME=" \
-+ /etc/sysconfig/network/dhcp
-+ /etc/sysconfig/network/ifcfg-${interface} 2>/dev/null`
-+ else
-+ eval `grep --no-filename "^[[:space:]]*DHCLIENT_SET_HOSTNAME=" \
-+ /etc/sysconfig/network/ifcfg-${interface} 2>/dev/null`
-+ fi
-+ else
-+ eval `grep --no-filename "^[[:space:]]*DHCLIENT_SET_HOSTNAME=" \
-+ /etc/sysconfig/network/dhcp 2>/dev/null`
-+ fi
-+ if [ "$DHCLIENT_SET_HOSTNAME" = yes ] ; then
-+ current_hostname=`hostname`
-+ if [ "x${current_hostname%%.*}" = x ] || \
-+ [ "x${current_hostname%%.*}" != "x${new_host_name%%.*}" ]; then
-+
-+ if [ "x${new_host_name%%.*}" != x ]; then
-+ hostname "${new_host_name%%.*}"
-+ else
-+ if [ -x /usr/bin/host ] ; then
-+ if out=`host -W 2 "$new_ip_address" 2>/dev/null` ; then
-+ _hostname="`echo "$out" | sed 's:^.* ::; s:\..*::'`"
-+ if [ "x${_hostname}" != x ]; then
-+ hostname "${_hostname}"
-+ fi
-+ fi
-+ fi
-+ fi
-+ fi
-+ fi
++ set_hostname
+
exit_with_hooks 0
fi
-@@ -168,7 +314,7 @@
+@@ -175,7 +337,7 @@ if [ x$reason = xEXPIRE ] || [ x$reason
fi
if [ x$old_ip_address != x ]; then
# Shut down interface, which will delete routes and clear arp cache.
@@ -342,35 +341,32 @@
fi
if [ x$alias_ip_address != x ]; then
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
-@@ -182,27 +328,37 @@
- ifconfig $interface:0- inet 0
+@@ -190,7 +352,7 @@ if [ x$reason = xTIMEOUT ]; then
fi
ifconfig $interface inet $new_ip_address $new_subnet_arg \
-- $new_broadcast_arg
-+ $new_broadcast_arg
- set $new_routers
- ############## what is -w in ping?
+ $new_broadcast_arg $mtu_arg
+- set $new_routers
++ set -- $new_routers
if ping -q -c 1 $1; then
if [ x$new_ip_address != x$alias_ip_address ] && \
-- [ 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
+ [ x$alias_ip_address != x ]; then
+@@ -201,14 +363,25 @@ if [ x$reason = xTIMEOUT ]; 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
- done
+- for router in $new_routers; do
+- route add default gw $router $metric_arg dev $interface
+- 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
++++++ dhcp-3.1.2p1-ldap-patch-mt-02.diff.bz2 -> dhcp-3.1.3-ldap-patch-mt-01.diff.bz2 ++++++
Files dhcp/dhcp-3.1.2p1-ldap-patch-mt-02.diff.bz2 and /mounts/work_src_done/STABLE/dhcp/dhcp-3.1.3-ldap-patch-mt-01.diff.bz2 differ
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org