rpms/dhcpv6/FC-3 dhcpv6-0.10-use_glibc_ifaddrs.patch, NONE, 1.1 dhcpv6-0.10-165882.patch, NONE, 1.1 dhcpv6.spec, 1.13, 1.14

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Aug 16 01:39:36 UTC 2005


Author: jvdias

Update of /cvs/dist/rpms/dhcpv6/FC-3
In directory cvs.devel.redhat.com:/tmp/cvs-serv10324

Modified Files:
	dhcpv6.spec 
Added Files:
	dhcpv6-0.10-use_glibc_ifaddrs.patch dhcpv6-0.10-165882.patch 
Log Message:
fix bugs 165882, 165884

dhcpv6-0.10-use_glibc_ifaddrs.patch:
 configure.in |    8 +-------
 1 files changed, 1 insertion(+), 7 deletions(-)

--- NEW FILE dhcpv6-0.10-use_glibc_ifaddrs.patch ---
--- dhcp-0.10/configure.in.use_glibc_ifaddrs	2003-04-11 20:25:33.000000000 -0400
+++ dhcp-0.10/configure.in	2005-08-15 19:58:48.000000000 -0400
@@ -66,14 +66,8 @@
 	;;
 *)	;;
 esac
-
-AC_REPLACE_FUNCS(getaddrinfo)
-AC_REPLACE_FUNCS(getnameinfo)
-AC_REPLACE_FUNCS(ifaddrs)
-AC_CHECK_FUNCS(if_nametoindex)
-AC_REPLACE_FUNCS(strlcpy strlcat)
-
 dnl Checks for header files.
+AC_REPLACE_FUNCS(strlcpy strlcat)
 AC_HEADER_STDC
 AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h syslog.h unistd.h ifaddrs.h)
 AC_MSG_CHECKING(for socklen_t)

dhcpv6-0.10-165882.patch:
 client6_addr.c |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

--- NEW FILE dhcpv6-0.10-165882.patch ---
--- dhcp-0.10/client6_addr.c.165882	2005-08-15 20:03:07.000000000 -0400
+++ dhcp-0.10/client6_addr.c	2005-08-15 20:53:09.000000000 -0400
@@ -47,6 +47,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <net/if_arp.h>
+#include <ifaddrs.h>
 
 #include "queue.h"
 #include "dhcp6.h"
@@ -695,39 +696,38 @@
 create_iaid(struct iaid_table *iaidtab, int num_device)
 {
 	struct iaid_table *temp = iaidtab;
-	char buff[1024];
-	struct ifconf ifc;
-	struct ifreq *ifr;//, if_hwaddr;
+	struct ifaddrs *ifa=0L;
 	int i;
 	
-	ifc.ifc_len = sizeof(buff);
-	ifc.ifc_buf = buff;
-	if (ioctl(nlsock, SIOCGIFCONF, &ifc) < 0) {
-		dprintf(LOG_ERR, "%s" "ioctl SIOCGIFCONF", FNAME);
+	if ( getifaddrs( &ifa ) != 0 )
+	{
+		dprintf(LOG_ERR, "%s" "getifaddrs", FNAME);
 		return -1;
 	}
 
-	ifr = ifc.ifc_req;
-	for (i = ifc.ifc_len / sizeof(struct ifreq); --i >= 0 && num_device < MAX_DEVICE; 
-	     ifr++) {
-		if (!strcmp(ifr->ifr_name, "lo")) continue;
-		temp->hwaddr.len = gethwid(temp->hwaddr.data, sizeof(temp->hwaddr.data), ifr->ifr_name, &temp->hwaddr.type);
+	for (i=0; 
+	     (ifa != 0L) && ( i < MAX_DEVICE );
+	     i++, ifa = ifa->ifa_next
+	    )
+	{
+		if (!strcmp(ifa->ifa_name, "lo")) continue;
+		temp->hwaddr.len = gethwid(temp->hwaddr.data, sizeof(temp->hwaddr.data), ifa->ifa_name, &temp->hwaddr.type);
 		switch (temp->hwaddr.type) {
 		case ARPHRD_ETHER:
 		case ARPHRD_IEEE802:
 			memcpy(&temp->iaid, temp->hwaddr.data, sizeof(temp->iaid));
 			break;
 		case ARPHRD_PPP:
-			temp->iaid = do_hash(ifr->ifr_name,sizeof(ifr->ifr_name))
-				+ if_nametoindex(ifr->ifr_name);
+			temp->iaid = do_hash(ifa->ifa_name,sizeof(ifa->ifa_name))
+				+ if_nametoindex(ifa->ifa_name);
 			break;
 		default:
 			dprintf(LOG_INFO, "doesn't support %s address family %d", 
-				ifr->ifr_name, temp->hwaddr.type);
+				ifa->ifa_name, temp->hwaddr.type);
 			continue;
 		}
 		dprintf(LOG_DEBUG, "%s"" create iaid %u for interface %s", 
-			FNAME, temp->iaid, ifr->ifr_name);
+			FNAME, temp->iaid, ifa->ifa_name);
 		num_device++;
 		temp++;
 	}


Index: dhcpv6.spec
===================================================================
RCS file: /cvs/dist/rpms/dhcpv6/FC-3/dhcpv6.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- dhcpv6.spec	14 Jan 2005 18:39:05 -0000	1.13
+++ dhcpv6.spec	16 Aug 2005 01:39:34 -0000	1.14
@@ -1,7 +1,7 @@
 Summary: DHCPv6 - DHCP server and client for IPv6
 Name:    dhcpv6
 Version: 0.10
-Release: 11_FC3
+Release: 14_FC3
 License: GPL 
 Group:   System Environment/Daemons
 URL:     http://dhcpv6.sourceforge.net/
@@ -20,6 +20,8 @@
 Patch9:  dhcpv6-0.10-bug_144585.patch
 Patch10: dhcpv6-0.10-prefix_delegation_interface.patch
 Patch11: dhcpv6-0.10-warnings.patch
+Patch12: dhcpv6-0.10-use_glibc_ifaddrs.patch
+Patch13: dhcpv6-0.10-165882.patch
 
 Prereq: /sbin/chkconfig, /sbin/service
 BuildRequires: flex, bison
@@ -49,15 +51,18 @@
 %patch9 -p1 -b .bug_144585
 %patch10 -p1 -b .prefix_delegation_interface
 %patch11 -p1 -b .warnings
+%patch12 -p1 -b .use_glibc_ifaddrs
+rm -f ifaddrs.h
+%patch13 -p1 -b .165882
 
 %build
-
+export CFLAGS="$RPM_OPT_FLAGS -fPIE"
+export LDFLAGS='-pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack'
+autoconf
 %configure \
 	--prefix=\
 	--mandir=/usr/share/man
-
-CFLAGS="$CFLAGS -Wall"
-export CFLAGS
+export CFLAGS="$CFLAGS -g -Wall"
 make
 cp -fp %{SOURCE1} docs
 
@@ -96,6 +101,7 @@
 if [ "$1" -ge "1" ]; then
   service dhcp6s condrestart >/dev/null 2>&1
 fi
+exit 0
 
 %clean
 rm -rf %{buildroot}
@@ -111,7 +117,7 @@
 %{_mandir}/man8/dhcp6s.8.gz
 %{_mandir}/man5/dhcp6s.conf.5.gz
 %{_mandir}/man8/dhcp6r.8.gz
-%attr(754,root,root) %dir %{_localstatedir}/lib/dhcpv6
+%attr(750,root,root) %dir %{_localstatedir}/lib/dhcpv6
 
 %doc ReadMe docs/* dhcp6s.conf server6_addr.conf
 
@@ -124,6 +130,19 @@
 %attr(750,root,root) %dir %{_localstatedir}/lib/dhcpv6
 
 %changelog
+* Mon Aug 15 2005 Jason Vas Dias <jvdias at redhat.com>
+- fix bug 165882: allow client to configure an interface which
+  does not have an IPv4 address ( use getifaddrs instead of
+  ioctl(sockfd, SIOGIFCONF, ...)
+- fix bug 165884 (possibly!): force use of glibc's getifaddrs,
+  not internal getifaddrs implementation
+
+* Fri Apr 01 2005 Florian La Roche <laroche at redhat.com>
+- made perms for /var/lib/dhcpv6 the same
+
+* Fri Mar 25 2005 Florian La Roche <laroche at redhat.com>
+- add "exit 0" to postun script
+
 * Thu Jan 13 2005 Jason Vas Dias <jvdias at redhat.com> - 0.10-11
 - Fix misc. compiler warnings and ms-dos formatted man-pages
 




More information about the fedora-cvs-commits mailing list