diff --git a/dhcp-3.1.1-dhclient-conf.dif b/dhcp-3.1.1-dhclient-conf.dif index 06a40df..14b8322 100644 --- a/dhcp-3.1.1-dhclient-conf.dif +++ b/dhcp-3.1.1-dhclient-conf.dif @@ -1,6 +1,6 @@ --- client/dhclient.conf -+++ client/dhclient.conf 2008/09/08 14:57:18 -@@ -1,36 +1,46 @@ ++++ client/dhclient.conf 2008/11/11 09:12:22 +@@ -1,36 +1,48 @@ -send host-name "andare.fugue.com"; -send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; +# @@ -35,10 +35,12 @@ -require subnet-mask, domain-name-servers; + +# Request several well known/usefull dhcp options. -+request subnet-mask, broadcast-address, routers, -+ host-name, domain-name, domain-name-servers, -+ nis-domain, nis-servers, netbios-name-servers, -+ ntp-servers, time-offset; ++request subnet-mask, network-number, broadcast-address, ++ routers, interface-mtu, host-name, domain-name, ++ domain-name-servers, nis-domain, nis-servers, ++ nds-context, nds-servers, nds-tree-name, ++ netbios-name-servers, netbios-dd-server, ++ netbios-node-type, netbios-scope, ntp-servers; + +# We request above options, require only the IP configuration: +require subnet-mask; diff --git a/dhcp-3.1.1-dhclient-script.dif b/dhcp-3.1.1-dhclient-script.dif index b0fac19..ad66d4c 100644 --- a/dhcp-3.1.1-dhclient-script.dif +++ b/dhcp-3.1.1-dhclient-script.dif @@ -1,5 +1,5 @@ --- client/dhclient-script.8 -+++ client/dhclient-script.8 2008/09/12 11:42:47 ++++ client/dhclient-script.8 2008/11/11 09:06:47 @@ -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 @@ -72,8 +72,8 @@ .B dhclient-script(8) has been written for Internet Systems Consortium --- client/scripts/linux -+++ client/scripts/linux 2008/09/12 11:43:12 -@@ -22,25 +22,87 @@ ++++ client/scripts/linux 2008/11/11 09:06:54 +@@ -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. @@ -104,7 +104,7 @@ + test -x /sbin/netconfig +} +netconfig_modify() { -+ if test -x /sbin/netconfig ; then ++ if test -x /sbin/netconfig -a -n "$interface" ; then + { + echo "INTERFACE='$interface'" + for v in ${!new_*}; do @@ -113,14 +113,24 @@ + (new_subnet_mask) k='NETMASK' ;; + (new_network_number) k='NETWORK' ;; + (new_broadcast_address) k='BROADCAST' ;; ++ (new_interface_mtu) k='MTU' ;; ++ #(new_static_routes) k='ROUTES' ;; + (new_routers) k='GATEWAYS' ;; ++ (new_host_name) k='HOSTNAME' ;; + (new_domain_name) k='DNSDOMAIN' ;; + (new_domain_name_servers) k='DNSSERVERS' ;; + (new_ntp_servers) k='NTPSERVERS' ;; + (new_nis_domain) k='NISDOMAIN' ;; + (new_nis_servers) k='NISSERVERS' ;; ++ (new_root_path) k='ROOTPATH' ;; ++ (new_dhcp_server_identifier)k='DHCPSID' ;; ++ (new_lpr_servers) k='LPRSERVER' ;; ++ (new_log_servers) k='LOGSERVER' ;; ++ (new_netbios_dd_server) k='NETBIOSDDSERVER' ;; + (new_netbios_name_servers) k='NETBIOSNAMESERVER' ;; -+ (*) : skip $v ; continue ;; ++ (new_netbios_node_type) k='NETBIOSNODETYPE' ;; ++ (new_netbios_scope) k='NETBIOSSCOPE' ;; ++ (*) k="dhclient_${v#new_}" ;; + esac + [ "k${k}" != k ] && echo "${k}='${!v}'" + done @@ -128,7 +138,7 @@ + fi +} +netconfig_remove() { -+ if test -x /sbin/netconfig ; then ++ if test -x /sbin/netconfig -a -n "$interface" ; then + /sbin/netconfig remove -s "dhclient3" -i "$interface" &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 +- done ++ ++ 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 ++ 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 ]; -@@ -156,7 +225,31 @@ + then +@@ -156,7 +247,41 @@ ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg route add -host $alias_ip_address $interface:0 fi @@ -247,30 +272,40 @@ + else + make_resolv_conf + fi -+ eval `grep --no-filename "^DHCLIENT_SET_HOSTNAME=" /etc/sysconfig/network/dhcp` ++ 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 + if [ "$DHCLIENT_SET_HOSTNAME" = yes ] ; then + + current_hostname=`hostname` -+ if [ x$current_hostname = x ] || \ -+ [ x$current_hostname != x$new_host_name ]; then ++ if [ "x${current_hostname%%.*}" = x ] || \ ++ [ "x${current_hostname%%.*}" != "x${new_host_name%%.*}" ]; then + -+ if [ x$new_host_name != x ]; then -+ hostname $new_host_name ++ 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:\..*::'` ++ _hostname="`echo "$out" | sed 's:^.* ::; s:\..*::'`" ++ if [ "x${_hostname}" != x ]; then ++ hostname "${_hostname}" ++ fi + fi + fi + fi -+ + fi + + fi exit_with_hooks 0 fi -@@ -168,7 +261,7 @@ +@@ -168,7 +293,7 @@ fi if [ x$old_ip_address != x ]; then # Shut down interface, which will delete routes and clear arp cache. @@ -279,7 +314,7 @@ fi if [ x$alias_ip_address != x ]; then ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg -@@ -182,27 +275,37 @@ +@@ -182,27 +307,37 @@ ifconfig $interface:0- inet 0 fi ifconfig $interface inet $new_ip_address $new_subnet_arg \ diff --git a/dhcp.changes b/dhcp.changes index 897ac0e..adab2f3 100644 --- a/dhcp.changes +++ b/dhcp.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue Nov 11 11:12:23 CET 2008 - mt@suse.de + +- Fixed dhclient-script to apply DHCLIENT_SET_HOSTNAME and + SET_DEFAULT_ROUTE policy correctly and inclusive of per + interface setings (bnc#426650). +- Fixed dhclient-script to make sure, the host name is set + as short-name even dhcp provides fqdn (bnc#418168) +- Fixed dhclient-script to translate all known dhcp options + to netconfig variables and unknown with dhclient prefix. +- Fixed dhclient.conf to request all netbios dhcp-options, + added also nds and mtu options. + ------------------------------------------------------------------- Fri Sep 12 16:58:22 CEST 2008 - mt@suse.de diff --git a/dhcp.spec b/dhcp.spec index 77fada9..f08a6a5 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -31,7 +31,7 @@ License: BSD 3-Clause Group: Productivity/Networking/Boot/Servers AutoReqProv: on Version: 3.1.1 -Release: 2 +Release: 5 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 @@ -486,6 +486,16 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi %doc %{_mandir}/man3/dhcpctl.3.gz %changelog +* Tue Nov 11 2008 mt@suse.de +- Fixed dhclient-script to apply DHCLIENT_SET_HOSTNAME and + SET_DEFAULT_ROUTE policy correctly and inclusive of per + interface setings (bnc#426650). +- Fixed dhclient-script to make sure, the host name is set + as short-name even dhcp provides fqdn (bnc#418168) +- Fixed dhclient-script to translate all known dhcp options + to netconfig variables and unknown with dhclient prefix. +- Fixed dhclient.conf to request all netbios dhcp-options, + added also nds and mtu options. * Fri Sep 12 2008 mt@suse.de - Removed one of two option_state_dereference calls in dhclient.c causing null pointer messages (not critical) in the log. @@ -751,7 +761,7 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi - add s390x to the list of platforms to compile with -fsigned-char to avoid the dhclient.conf parse error "expecting a statement" [#171532], [#134590] -* Fri May 05 2006 rml@suse.de +* Thu May 04 2006 rml@suse.de - Add "-H" flag for setting hostname (Novell major bug #139532) * Wed Mar 29 2006 poeml@suse.de - fix two further include paths in dhcpctl.3 and omapi.3 @@ -768,7 +778,7 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi * Sat Jan 14 2006 thoenig@suse.de - replaced 'nis-domain-servers' by 'nis-servers' in dhcp-3.0.3-dhclient-nis-01-thoenig.patch (follow-up #134160) -* Sat Jan 14 2006 thoenig@suse.de +* Fri Jan 13 2006 thoenig@suse.de - add 'nis-domain' and 'nis-domain-servers' to 'request' dhclient.conf (dhcp-3.0.3-dhclient-nis-01-thoenig.patch). If the DHCP reply contains information about NIS, NM will set those. @@ -803,7 +813,7 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi - build with pie/PIE depending on architecture. * Thu Jun 30 2005 gekker@suse.de - Add -DEXTENDED_NEW_OPTION_INFO to CFLAGS for rml -* Wed Jun 29 2005 gekker@suse.de +* Tue Jun 28 2005 gekker@suse.de - Add support for dhcdbd, patches from RH via rml * Mon Jun 20 2005 ro@suse.de - build with pie/fpie @@ -1092,7 +1102,7 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi instead * Sun Jan 11 2004 adrian@suse.de - build as user -* Wed Nov 19 2003 poeml@suse.de +* Tue Nov 18 2003 poeml@suse.de - if starting dhcpd in chroot jail, and a pid file is present in the jail, and the pid file does not contain a pid of a running dhcpd process, but that of another _running_ process, remove @@ -1310,7 +1320,7 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi correctly set to /sbin --> drop 2 hunks from dhcp-3.0rc10.dif * Tue Mar 26 2002 ro@suse.de - Fix handling of initscript links and START_* variable [Bug #13755] -* Mon Feb 11 2002 poeml@suse.de +* Sun Feb 10 2002 poeml@suse.de - drop the sysconfig/network/dhcp template. It's in the syconfig package now. - strip /sbin/dhclient @@ -1324,7 +1334,7 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi filled up into /etc/sysconfig/network/config * Wed Jan 30 2002 poeml@suse.de - add /sbin/dhclient, accidentally deleted from filelist lately -* Mon Jan 28 2002 ro@suse.de +* Sun Jan 27 2002 ro@suse.de - remove START_DHCPD on update - use fillup_only where no initscript is handled * Sun Jan 27 2002 poeml@suse.de @@ -1594,7 +1604,7 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi * Wed Jun 23 1999 rolf@suse.de - new version 2.0 - apply fix from Michael Hasenstein -* Tue Mar 09 1999 ro@suse.de +* Mon Mar 08 1999 ro@suse.de - fixed man5-path * Fri Feb 26 1999 rolf@suse.de - new version 2.0b1pl16 (stable beta)