Hello community, here is the log from the commit of package dhcp checked in at Sat Aug 23 00:17:42 CEST 2008. -------- --- dhcp/dhcp.changes 2008-06-27 14:30:11.000000000 +0200 +++ dhcp/dhcp.changes 2008-08-22 13:34:24.729269000 +0200 @@ -1,0 +2,68 @@ +Fri Aug 22 13:34:07 CEST 2008 - mt@suse.de + +- Adopted dhclient-script and manual page to use /sbin/netconfig + that is replacing the modify_resolvconf mechanizm by default. + +------------------------------------------------------------------- +Wed Aug 20 15:11:14 CEST 2008 - mt@suse.de + +- Updated to dhcp-3.0.7, a maintenance release containing several + bug fixes; since the 3.0.6 release this are: + * Fixed "--version" flag in dhcrelay. + * Clarified error message when lease limit exceeded + * Fixed a buffer overflow error which could have allowed a denial + of service under unusual server configurations + * Bug in octal parsing fixed. Thanks to Bernd Fuhrmann for the + report and fix. + * The warning logged when an address range doesn't fit in the + subnets they were declared has been updated to be more helpful + and identify the typo in configuration that created the + spanning addresses. + * The 'min-secs' configuration parameter's log message has been + updated to be more helpful. + * Fixed a bug in which write_lease() might report a failure + incorrectly. + * Bug in server configuration parser caused server to get stuck + on startup for certain bad pool declarations. Thanks to + Guillaume Knispel for the bug report and fix. + * Fixed file descriptor leak on listen failure. Thanks to Tom + Clark. + * Failover binding acks are now transmitted before new binding + updates (which may, very rarely, be related to a lease on the + ack queue). This eliminates a lease database inconsistency + bug, as the remote system relies upon the most recent message + it received from its peer. + * POOLREQ messages received within 30 seconds of one another are + ignored. + * 'lease imbalance' messages are not logged unless rebalance was + actually attempted ("ten percent" rule). + * A bug was fixed where the 'giaddr' may be used to find the + client's subnet rather than its own 'ciaddr'. + * A log message was introduced to clarify the situation where a + failover 'address' parameter (the server's local address) did + not resolve to an IPv4 address. + * When server is configured with options that it overrides, a + warning is issued when the configuration file is read, rather + than at the time the option is overridden. This was important, + because the warning was given every time the option was + overridden, which could create a lot of unnecessary logging. + * When a failover server suspects it has encountered a peer + running a version 3.1.x failover server, a warning that the + failover wire protocol is incompatible is printed. + * The failover server no longer issues a floating point error + if it encounters a previously undefined option code. + * A memory leak when using omapi has been fixed. +- Adopted dhcp-send-hostname-rml patch +- Removed obsolete dhcp-3.0.5-pool_eof patch +- Merged changes between server:isc-dhcp and openSUSE:Factory +- Removed down parameter from ifconfig calls in dhclient-script + because it destroys bonding interfaces and also conflicts with + an dhcpv6 client running on same interface (bnc#410905). + +------------------------------------------------------------------- +Wed Aug 20 14:11:14 CEST 2008 - skalyanasundaram@novell.com + +- Added missing DNs (dhcpZoneDN, dhcpFailOverPeerDN) to list of + external references. + +------------------------------------------------------------------- Old: ---- dhcp-3.0.5-pool_eof.dif dhcp-3.0.6.tar.gz dhcp-3.0.6.tar.gz.asc New: ---- dhcp-3.0.6-ldap-patch_external-dn.diff dhcp-3.0.7-dhclient-script-netconfig.dif dhcp-3.0.7-dhclient-script-skip-ifconfig-down.dif dhcp-3.0.7.tar.gz dhcp-3.0.7.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dhcp.spec ++++++ --- /var/tmp/diff_new_pack.G10146/_old 2008-08-23 00:13:21.000000000 +0200 +++ /var/tmp/diff_new_pack.G10146/_new 2008-08-23 00:13:21.000000000 +0200 @@ -1,10 +1,17 @@ # -# spec file for package dhcp (Version 3.0.6) +# spec file for package dhcp (Version 3.0.7) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -23,8 +30,8 @@ License: BSD 3-Clause Group: Productivity/Networking/Boot/Servers AutoReqProv: on -Version: 3.0.6 -Release: 88 +Version: 3.0.7 +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 @@ -65,7 +72,6 @@ Patch41: makefile.diff Patch51: dhcp-3.0.5-tmpfile.dif Patch52: dhcp-3.0.3-man.dif -Patch53: dhcp-3.0.5-pool_eof.dif ## LDAP support for DHCP server ## patch lives here: http://home.ntelos.net/~masneyb/ %define DHCPD_LDAP 1 @@ -75,6 +81,7 @@ Patch62: dhcp-3.0.5-ldap-patch_server_dn.dif Patch63: dhcp-3.0.5-ldap-patch_host_brace.dif Patch64: dhcp-3.0.6-ldap-patch_hwaddr-icase.dif +Patch65: dhcp-3.0.6-ldap-patch_external-dn.diff %endif %if %{?suse_version:%suse_version}%{?!suse_version:99999} > 930 Patch70: dhcp-3.0.3b1-pie.dif @@ -89,6 +96,8 @@ Patch86: dhcp-3.0.6-dhclient-conf-no-script.patch Patch87: dhcp-3.0.6-dhclient-conf-requires.patch Patch88: dhcp-3.0.6-dhclient-script-sethostname.patch +Patch89: dhcp-3.0.7-dhclient-script-skip-ifconfig-down.dif +Patch90: dhcp-3.0.7-dhclient-script-netconfig.dif Obsoletes: dhcp-base Provides: dhcp-base:/usr/bin/omshell PreReq: /bin/touch /sbin/chkconfig @@ -205,13 +214,13 @@ %patch41 %patch51 -p1 %patch52 -p1 -%patch53 -p0 %if %DHCPD_LDAP %patch60 -p1 %patch61 -p0 %patch62 -p0 %patch63 -p0 %patch64 -p0 +%patch65 -p0 %endif %if %{?suse_version:%suse_version}%{?!suse_version:99999} > 930 %patch70 @@ -225,6 +234,8 @@ %patch86 -p1 %patch87 -p1 %patch88 -p1 +%patch89 -p0 +%patch90 -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} . for i in README LIESMICH; do @@ -493,6 +504,65 @@ %doc %{_mandir}/man3/dhcpctl.3.gz %changelog +* Fri Aug 22 2008 mt@suse.de +- Adopted dhclient-script and manual page to use /sbin/netconfig + that is replacing the modify_resolvconf mechanizm by default. +* Wed Aug 20 2008 mt@suse.de +- Updated to dhcp-3.0.7, a maintenance release containing several + bug fixes; since the 3.0.6 release this are: + * Fixed "--version" flag in dhcrelay. + * Clarified error message when lease limit exceeded + * Fixed a buffer overflow error which could have allowed a denial + of service under unusual server configurations + * Bug in octal parsing fixed. Thanks to Bernd Fuhrmann for the + report and fix. + * The warning logged when an address range doesn't fit in the + subnets they were declared has been updated to be more helpful + and identify the typo in configuration that created the + spanning addresses. + * The 'min-secs' configuration parameter's log message has been + updated to be more helpful. + * Fixed a bug in which write_lease() might report a failure + incorrectly. + * Bug in server configuration parser caused server to get stuck + on startup for certain bad pool declarations. Thanks to + Guillaume Knispel for the bug report and fix. + * Fixed file descriptor leak on listen failure. Thanks to Tom + Clark. + * Failover binding acks are now transmitted before new binding + updates (which may, very rarely, be related to a lease on the + ack queue). This eliminates a lease database inconsistency + bug, as the remote system relies upon the most recent message + it received from its peer. + * POOLREQ messages received within 30 seconds of one another are + ignored. + * 'lease imbalance' messages are not logged unless rebalance was + actually attempted ("ten percent" rule). + * A bug was fixed where the 'giaddr' may be used to find the + client's subnet rather than its own 'ciaddr'. + * A log message was introduced to clarify the situation where a + failover 'address' parameter (the server's local address) did + not resolve to an IPv4 address. + * When server is configured with options that it overrides, a + warning is issued when the configuration file is read, rather + than at the time the option is overridden. This was important, + because the warning was given every time the option was + overridden, which could create a lot of unnecessary logging. + * When a failover server suspects it has encountered a peer + running a version 3.1.x failover server, a warning that the + failover wire protocol is incompatible is printed. + * The failover server no longer issues a floating point error + if it encounters a previously undefined option code. + * A memory leak when using omapi has been fixed. +- Adopted dhcp-send-hostname-rml patch +- Removed obsolete dhcp-3.0.5-pool_eof patch +- Merged changes between server:isc-dhcp and openSUSE:Factory +- Removed down parameter from ifconfig calls in dhclient-script + because it destroys bonding interfaces and also conflicts with + an dhcpv6 client running on same interface (bnc#410905). +* Wed Aug 20 2008 skalyanasundaram@novell.com +- Added missing DNs (dhcpZoneDN, dhcpFailOverPeerDN) to list of + external references. * Fri Jun 27 2008 mt@suse.de - Added /etc/openldap directory to the file list of the dhcp-server package, because it is not provided by the ldap package any more. ++++++ dhcp-3.0.6-ldap-patch_external-dn.diff ++++++ --- server/ldap.c +++ server/ldap.c 2008-05-10 07:49:20.000000000 +0530 @@ -893,7 +893,15 @@ { char *search[] = {"dhcpOptionsDN", "dhcpSharedNetworkDN", "dhcpSubnetDN", "dhcpGroupDN", "dhcpHostDN", "dhcpClassesDN", - "dhcpPoolDN", NULL}; + "dhcpPoolDN", "dhcpZoneDN", "dhcpFailOverPeerDN", NULL}; + + /* FIXME: dhcpKeyDN can't be added. It is referenced in dhcpDnsZone to + retrive the key name (cn). Adding keyDN will reflect adding a key declaration + inside the zone configuration. + + dhcpSubClassesDN cant be added. It is also similar to the above. + Needs schema change. + */ LDAPMessage * newres, * newent; struct ldap_config_stack *ns; char **tempstr; ++++++ dhcp-3.0.7-dhclient-script-netconfig.dif ++++++ --- client/dhclient-script.8 +++ client/dhclient-script.8 2008/08/22 10:05:02 @@ -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 -user to override the default behaviour of the client in creating a +user to override the default behaviour of the client in applying of +additional settings like DNS (e.g. creating a .B /etc/resolv.conf -file. +file), NTP or YP to the system. .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,14 +60,46 @@ customizing .B ETCDIR/dhclient.conf or using the enter and exit hooks, please submit a bug report. .SH HOOKS -When it starts, the client script first defines a shell function, -.B make_resolv_conf , -which is later used to create the -.B /etc/resolv.conf -file. To override the default behaviour, redefine this function in -the enter hook script. +When it starts, the client script first defines several shell functions: +.BR use_netconfig , +.BR netconfig_modify , +.BR netconfig_remove , +.BR make_resolv_conf , +.BR make_ntp_runtime_conf , +.BR restore_resolv_conf , +and +.BR remove_ntp_runtime_conf . +These functions are later used to apply DNS, NTP, YP, and other additional +settings to the system. + +The +.B use_netconfig +returns true (0), when the /sbin/netconfig script is supported / installed +and enables the use of +.B netconfig_modify +and +.B netconfig_remove +functions. See also the netconfig(8) manual page. +.br +Otherwise, the compatibility functions +.BR make_resolv_conf , +.BR restore_resolv_conf , +.BR make_ntp_runtime_conf , +and +.B remove_ntp_runtime_conf +functions are used. The default implementation of make_resolv_conf is to +modify the /etc/resolv.conf file in /sbin/modify_resolvconf script +compatible way. The make_ntp_runtime_conf makes use of the /etc/init.d/ntp +init script mechanism to apply the NTP server provided by dhcp at runtime. + +.IR Note : +The /sbin/modify_resolvconf script and mechanizm is obsoleted by netconfig +and not shipped or supported any more since openSUSE 11.1. + +To override the default behaviour, redefine these functions in the enter +hook script. .PP -On after defining the make_resolv_conf function, the client script checks +On after defining the netconfig functions, the client script checks for the presence of an executable .B ETCDIR/dhclient-enter-hooks script, and if present, it invokes the script inline, using the Bourne @@ -220,8 +253,8 @@ the other. Assuming the information pr valid, this shouldn't cause any real problems, but it could be confusing. .SH SEE ALSO -dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and -dhclient.leases(5). +dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5), +dhclient.leases(5) and netconfig(8). .SH AUTHOR .B dhclient-script(8) has been written for Internet Systems Consortium --- client/scripts/linux +++ client/scripts/linux 2008/08/22 09:52:12 @@ -57,6 +57,36 @@ if [ -n "${dhc_dbus}" ]; then fi; fi; +use_netconfig() { + test -x /sbin/netconfig +} + +netconfig_modify() { + { + echo "INTERFACE='$interface'" + for v in ${!new_*}; do + case $v in + (new_ip_address) k='IPADDR' ;; + (new_subnet_mask) k='NETMASK' ;; + (new_network_number) k='NETWORK' ;; + (new_broadcast_address) k='BROADCAST' ;; + (new_routers) k='GATEWAYS' ;; + (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_netbios_name_servers) k='NETBIOSNAMESERVER' ;; + (*) : skip $v ; continue ;; + esac + [ "k${k}" != k ] && echo "${k}='${!v}'" + done + } | /sbin/netconfig modify -s "dhclient3" -i "$interface" +} + +netconfig_remove() { + /sbin/netconfig remove -s "dhclient3" -i "$interface" </dev/null +} make_resolv_conf() { # first, look if we are allowed to modify resolv.conf: @@ -103,14 +133,22 @@ make_resolv_conf() { done } +restore_resolv_conf() { + # restore backup copy of resolv.conf + if test -f /etc/resolv.conf.saved.by.dhclient ; then + mv -f /etc/resolv.conf.saved.by.dhclient /etc/resolv.conf + fi +} + remove_ntp_runtime_conf() { - if test -f "/var/run/ntp/servers.${interface}" ; then - rm -f "/var/run/ntp/servers.${interface}" + # remove runtime ntp conf + if test -f "/var/run/ntp/servers.${interface}" ; then + rm -f "/var/run/ntp/servers.${interface}" - if test -x /etc/init.d/ntp ; then - /etc/init.d/ntp try-restart - fi + if test -x /etc/init.d/ntp ; then + /etc/init.d/ntp try-restart fi + fi } make_ntp_runtime_conf() { @@ -313,8 +351,12 @@ if [ x$reason = xBOUND ] || [ x$reason = fi fi if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 1 ) != 1 )); then - make_resolv_conf - make_ntp_runtime_conf + if use_netconfig ; then + netconfig_modify + else + make_resolv_conf + make_ntp_runtime_conf + fi eval `grep --no-filename "^DHCLIENT_SET_HOSTNAME=" /etc/sysconfig/network/dhcp` if [ "$DHCLIENT_SET_HOSTNAME" = yes ] ; then @@ -377,19 +419,22 @@ if [ x$reason = xTIMEOUT ]; then for router in $new_routers; do route add default gw $router done - make_resolv_conf - make_ntp_runtime_conf + if use_netconfig ; then + netconfig_modify + else + make_resolv_conf + make_ntp_runtime_conf + fi exit_with_hooks 0 fi ifconfig $interface inet 0 exit_with_hooks 1 fi -# restore backup copy of resolv.conf -if test -f /etc/resolv.conf.saved.by.dhclient ; then - mv /etc/resolv.conf.saved.by.dhclient /etc/resolv.conf +if use_netconfig ; then + netconfig_remove +else + restore_resolv_conf + remove_ntp_runtime_conf fi -# remove runtime ntp conf -remove_ntp_runtime_conf - exit_with_hooks 0 ++++++ dhcp-3.0.7-dhclient-script-skip-ifconfig-down.dif ++++++ --- client/scripts/linux +++ client/scripts/linux 2008/08/20 13:34:25 @@ -266,7 +266,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 fi @@ -347,7 +347,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. - ifconfig $interface inet 0 down + ifconfig $interface inet 0 fi if [ x$alias_ip_address != x ]; then ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg @@ -381,7 +381,7 @@ if [ x$reason = xTIMEOUT ]; then make_ntp_runtime_conf exit_with_hooks 0 fi - ifconfig $interface inet 0 down + ifconfig $interface inet 0 exit_with_hooks 1 fi ++++++ dhcp-3.0.6.tar.gz -> dhcp-3.0.7.tar.gz ++++++ ++++ 2453 lines of diff (skipped) ++++++ dhcp-send-hostname-rml.patch ++++++ --- /var/tmp/diff_new_pack.G10146/_old 2008-08-23 00:13:22.000000000 +0200 +++ /var/tmp/diff_new_pack.G10146/_new 2008-08-23 00:13:22.000000000 +0200 @@ -47,9 +47,9 @@ + } else if (!strcmp (argv [i], "-H")) { + if (++i == argc || !argv[i] || *(argv[i]) == '\0') + usage (); -+ if (strlen (argv[i]) >= DHCP_OPTION_LEN) { ++ if (strlen (argv[i]) > HOST_NAME_MAX) { + log_error("-H option host-name string \"%s\" is too long:" -+ "maximum length is %d characters", argv[i], DHCP_OPTION_LEN-1); ++ "maximum length is %d characters", argv[i], HOST_NAME_MAX); + exit(1); + } + dhclient_hostname = argv [i]; @@ -63,15 +63,15 @@ + /* If the user specified a hostname, send it here and now */ + if ((dhclient_hostname != NULL) && (*dhclient_hostname != '\0') ) { + struct parse *cfile = NULL; -+ char buf[DHCP_OPTION_LEN + 40]; ++ char buf[HOST_NAME_MAX + 40]; + int len; + -+ len = sprintf (buf, "send host-name \"%s\";", dhclient_hostname); ++ len = snprintf (buf, sizeof(buf), "send host-name \"%s\";", dhclient_hostname); + + status = new_parse (&cfile, -1, buf, len, "host-name option", 0); + + if (status != ISC_R_SUCCESS) -+ log_fatal ("Cannot parse dhcp-client-identifier send statement!"); ++ log_fatal ("Cannot parse send host-name statement!"); + + for (;;) { + const char *val = NULL; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org