rpms/dhcpv6/devel dhcpv6-0.10-salen.patch, 1.3, 1.4 dhcpv6-0.10-libdhcp6client.patch, 1.10, 1.11 dhcpv6.spec, 1.53, 1.54

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Mar 26 15:01:25 UTC 2007


Author: dcantrel

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

Modified Files:
	dhcpv6-0.10-libdhcp6client.patch dhcpv6.spec 
Added Files:
	dhcpv6-0.10-salen.patch 
Log Message:
* Mon Mar 26 2007 David Cantrell <dcantrell at redhat.com> - 0.10-41
- Pass correct sockaddr size for salen parameter to getnameinfo() (#233900)
- Spec file cleanups per Fedora Packaging Guidelines


dhcpv6-0.10-salen.patch:
 common.c     |   11 ++++++-----
 dhcp6c.c     |    4 ++--
 dhcp6relay.c |    2 +-
 dhcp6s.c     |    9 +++++----
 4 files changed, 14 insertions(+), 12 deletions(-)

Index: dhcpv6-0.10-salen.patch
===================================================================
RCS file: dhcpv6-0.10-salen.patch
diff -N dhcpv6-0.10-salen.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dhcpv6-0.10-salen.patch	26 Mar 2007 15:01:23 -0000	1.4
@@ -0,0 +1,111 @@
+--- dhcp-0.10/common.c.salen	2007-03-26 10:37:38.000000000 -0400
++++ dhcp-0.10/common.c	2007-03-26 10:39:35.000000000 -0400
+@@ -84,7 +84,7 @@
+ struct dhcp6_if *dhcp6_if;
+ struct dns_list dnslist;
+ static struct host_conf *host_conflist;
+-static int in6_matchflags __P((struct sockaddr *, char *, int));
++static int in6_matchflags __P((struct sockaddr *, size_t, char *, int));
+ ssize_t gethwid __P((unsigned char *, int, const char *, u_int16_t *));
+ static int get_assigned_ipv6addrs __P((unsigned char *, unsigned char *,
+ 					struct dhcp6_optinfo *));
+@@ -398,7 +398,7 @@
+ 		if (sizeof(*(ifa->ifa_addr)) > sizeof(sin6))
+ 			continue;
+ 
+-		if (in6_matchflags(ifa->ifa_addr, ifa->ifa_name, ignoreflags))
++		if (in6_matchflags(ifa->ifa_addr, sizeof(sin6), ifa->ifa_name, ignoreflags))
+ 			continue;
+ 
+ 		memcpy(&sin6, ifa->ifa_addr, sizeof(sin6));
+@@ -591,7 +591,7 @@
+ 	sa6.sin6_addr = *in6;
+ 	sa6.sin6_scope_id = scopeid;
+ 
+-	return (addr2str((struct sockaddr *)&sa6, sizeof (*in6)));
++	return (addr2str((struct sockaddr *)&sa6, sizeof (sa6)));
+ }
+ 
+ /* return IPv6 address scope type. caller assumes that smaller is narrower. */
+@@ -632,8 +632,9 @@
+ }
+ 
+ static int
+-in6_matchflags(addr, ifnam, flags)
++in6_matchflags(addr, addrlen, ifnam, flags)
+ 	struct sockaddr *addr;
++	size_t addrlen;
+ 	char *ifnam;
+ 	int flags;
+ {
+@@ -650,7 +651,7 @@
+ 
+ 	if (ioctl(s, SIOCGIFFLAGS, &ifr) < 0) {
+ 		warn("in6_matchflags: ioctl(SIOCGIFFLAGS, %s)",
+-		     addr2str(addr, sizeof (addr->sa_data)));
++		     addr2str(addr, addrlen));
+ 		close(s);
+ 		return (-1);
+ 	}
+--- dhcp-0.10/dhcp6c.c.salen	2007-03-26 10:37:38.000000000 -0400
++++ dhcp-0.10/dhcp6c.c	2007-03-26 10:42:07.000000000 -0400
+@@ -1145,7 +1145,7 @@
+ 
+ 	dprintf(LOG_DEBUG, "%s" "receive %s from %s scope id %d %s", FNAME,
+ 		dhcp6msgstr(dh6->dh6_msgtype),
+-		addr2str((struct sockaddr *)&from, sizeof (((struct sockaddr *)&from)->sa_data)),
++		addr2str((struct sockaddr *)&from, sizeof (from)),
+ 		((struct sockaddr_in6 *)&from)->sin6_scope_id,
+ 		ifp->ifname);
+ 
+@@ -1170,7 +1170,7 @@
+ 	default:
+ 		dprintf(LOG_INFO, "%s" "received an unexpected message (%s) "
+ 			"from %s", FNAME, dhcp6msgstr(dh6->dh6_msgtype),
+-			addr2str((struct sockaddr *)&from, sizeof(((struct sockaddr *)&from)->sa_data)));
++			addr2str((struct sockaddr *)&from, sizeof(from)));
+ 		break;
+ 	}
+ 
+--- dhcp-0.10/dhcp6relay.c.salen	2007-03-26 10:37:38.000000000 -0400
++++ dhcp-0.10/dhcp6relay.c	2007-03-26 10:42:31.000000000 -0400
+@@ -496,7 +496,7 @@
+ 	}
+ 
+ 	dprintf(LOG_DEBUG, "relay6_recv: from %s, size %d",
+-		addr2str((struct sockaddr *)&from, sizeof(from.data)), len); 
++		addr2str((struct sockaddr *)&from, sizeof(from)), len);
+ 
+ 	/* get optional information as ancillary data (if available) */
+ 	for (cm = (struct cmsghdr *)CMSG_FIRSTHDR(&rmh); cm;
+--- dhcp-0.10/dhcp6s.c.salen	2007-03-26 10:37:38.000000000 -0400
++++ dhcp-0.10/dhcp6s.c	2007-03-26 10:43:33.000000000 -0400
+@@ -568,7 +568,8 @@
+ 
+ 	dprintf(LOG_DEBUG, "%s" "received %s from %s", FNAME,
+ 	    dhcp6msgstr(dh6->dh6_msgtype),
+-	    addr2str((struct sockaddr *)&from, sizeof(((struct sockaddr *)&from)->sa_data)));
++	    addr2str((struct sockaddr *)&from, sizeof(from)));
++
+ 
+ 	dhcp6_init_options(&optinfo);
+ 
+@@ -1075,15 +1076,15 @@
+ 
+ 	dst.sin6_scope_id = ((struct sockaddr_in6 *)from)->sin6_scope_id;
+ 	dprintf(LOG_DEBUG, "send destination address is %s, scope id is %d", 
+-		addr2str((struct sockaddr *)&dst, sizeof(dst.sin6_addr)), dst.sin6_scope_id);
++		addr2str((struct sockaddr *)&dst, sizeof(dst)), dst.sin6_scope_id);
+ 	if (transmit_sa(outsock, &dst, replybuf, len) != 0) {
+ 		dprintf(LOG_ERR, "%s" "transmit %s to %s failed", FNAME,
+-			dhcp6msgstr(type), addr2str((struct sockaddr *)&dst, sizeof(dst.sin6_addr)));
++			dhcp6msgstr(type), addr2str((struct sockaddr *)&dst, sizeof(dst)));
+ 		return (-1);
+ 	}
+ 
+ 	dprintf(LOG_DEBUG, "%s" "transmit %s to %s", FNAME,
+-		dhcp6msgstr(type), addr2str((struct sockaddr *)&dst, sizeof(dst.sin6_addr)));
++		dhcp6msgstr(type), addr2str((struct sockaddr *)&dst, sizeof(dst)));
+ 
+ 	return 0;
+ }

dhcpv6-0.10-libdhcp6client.patch:
 client6_addr.c                   |   44 ++++--
 common.c                         |   24 +++
 dhcp6.h                          |   17 ++
 dhcp6c.c                         |  284 +++++++++++++++++++++++++++++++--------
 libdhcp6client/Makefile          |   68 +++++++++
 libdhcp6client/dhc6_alloc.c      |   54 +++++++
 libdhcp6client/dhc6_alloc.h      |   16 ++
 libdhcp6client/dhcp6client.h     |   25 +++
 libdhcp6client/libdhcp_control.h |  128 +++++++++++++++++
 9 files changed, 596 insertions(+), 64 deletions(-)

Index: dhcpv6-0.10-libdhcp6client.patch
===================================================================
RCS file: /cvs/dist/rpms/dhcpv6/devel/dhcpv6-0.10-libdhcp6client.patch,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- dhcpv6-0.10-libdhcp6client.patch	9 Feb 2007 06:19:06 -0000	1.10
+++ dhcpv6-0.10-libdhcp6client.patch	26 Mar 2007 15:01:23 -0000	1.11
@@ -1,5 +1,5 @@
---- dhcp-0.10/client6_addr.c.libdhcp6client	2007-02-09 01:02:08.000000000 -0500
-+++ dhcp-0.10/client6_addr.c	2007-02-09 01:02:08.000000000 -0500
+--- dhcp-0.10/client6_addr.c.libdhcp6client	2007-03-26 10:43:55.000000000 -0400
++++ dhcp-0.10/client6_addr.c	2007-03-26 10:43:55.000000000 -0400
 @@ -56,6 +56,10 @@
  #include "timer.h"
  #include "lease.h"
@@ -80,8 +80,8 @@
  	if (write_lease(sp, client6_lease_file) != 0) {
  		dprintf(LOG_ERR, "%s" 
  			"failed to write an updated lease address %s to lease file", 
---- dhcp-0.10/dhcp6c.c.libdhcp6client	2007-02-09 01:02:08.000000000 -0500
-+++ dhcp-0.10/dhcp6c.c	2007-02-09 01:02:08.000000000 -0500
+--- dhcp-0.10/dhcp6c.c.libdhcp6client	2007-03-26 10:43:55.000000000 -0400
++++ dhcp-0.10/dhcp6c.c	2007-03-26 10:43:55.000000000 -0400
 @@ -73,6 +73,9 @@
  #include "common.h"
  #include "timer.h"
@@ -825,8 +825,8 @@
  		}
  	}
  
---- dhcp-0.10/common.c.libdhcp6client	2007-02-09 01:02:08.000000000 -0500
-+++ dhcp-0.10/common.c	2007-02-09 01:02:08.000000000 -0500
+--- dhcp-0.10/common.c.libdhcp6client	2007-03-26 10:43:55.000000000 -0400
++++ dhcp-0.10/common.c	2007-03-26 10:45:57.000000000 -0400
 @@ -79,11 +79,19 @@
  #include "timer.h"
  #include "lease.h"
@@ -844,7 +844,7 @@
 +#else
  static struct host_conf *host_conflist;
 +#endif
- static int in6_matchflags __P((struct sockaddr *, char *, int));
+ static int in6_matchflags __P((struct sockaddr *, size_t, char *, int));
  ssize_t gethwid __P((unsigned char *, int, const char *, u_int16_t *));
  static int get_assigned_ipv6addrs __P((unsigned char *, unsigned char *,
 @@ -148,7 +156,7 @@
@@ -856,7 +856,7 @@
  		dprintf(LOG_ERR, "%s" "failed to copy ifname", FNAME);
  		goto die;
  	}
-@@ -718,6 +726,9 @@
+@@ -719,6 +727,9 @@
  	struct dhcp6_duid_type1 *dp; /* we only support the type1 DUID */
  	unsigned char tmpbuf[256];	/* DUID should be no more than 256 bytes */
  
@@ -866,7 +866,7 @@
  	if ((fp = fopen(idfile, "r")) == NULL && errno != ENOENT)
  		dprintf(LOG_NOTICE, "%s" "failed to open DUID file: %s",
  		    FNAME, idfile);
-@@ -772,6 +783,9 @@
+@@ -773,6 +784,9 @@
  	}
  
  	/* save the (new) ID to the file for next time */
@@ -876,7 +876,7 @@
  	if (!fp) {
  		if ((fp = fopen(idfile, "w+")) == NULL) {
  			dprintf(LOG_ERR, "%s"
-@@ -2027,8 +2041,16 @@
+@@ -2032,8 +2046,16 @@
  	va_list ap;
  	char logbuf[LINE_MAX];
  
@@ -893,8 +893,8 @@
  
  	if (foreground && debug_thresh >= level) {
  		time_t now;
---- dhcp-0.10/dhcp6.h.libdhcp6client	2007-02-09 01:02:08.000000000 -0500
-+++ dhcp-0.10/dhcp6.h	2007-02-09 01:02:08.000000000 -0500
+--- dhcp-0.10/dhcp6.h.libdhcp6client	2007-03-26 10:43:55.000000000 -0400
++++ dhcp-0.10/dhcp6.h	2007-03-26 10:43:55.000000000 -0400
 @@ -116,9 +116,24 @@
  
  typedef enum { IANA, IATA, IAPD} iatype_t;
@@ -921,8 +921,8 @@
  /* Internal data structure */
  
  struct duid {
---- /dev/null	2007-02-06 10:40:24.955607220 -0500
-+++ dhcp-0.10/libdhcp6client/libdhcp_control.h	2007-02-09 01:02:08.000000000 -0500
+--- /dev/null	2007-03-21 18:57:18.434748430 -0400
++++ dhcp-0.10/libdhcp6client/libdhcp_control.h	2007-03-26 10:43:55.000000000 -0400
 @@ -0,0 +1,128 @@
 +/* libdhcp_control.h
 + *
@@ -1052,8 +1052,8 @@
 +} LIBDHCP_Capability;
 +
 +#endif
---- /dev/null	2007-02-06 10:40:24.955607220 -0500
-+++ dhcp-0.10/libdhcp6client/dhc6_alloc.h	2007-02-09 01:02:08.000000000 -0500
+--- /dev/null	2007-03-21 18:57:18.434748430 -0400
++++ dhcp-0.10/libdhcp6client/dhc6_alloc.h	2007-03-26 10:43:55.000000000 -0400
 @@ -0,0 +1,16 @@
 +extern void *dhc6_alloc(size_t);
 +extern void *dhc6_realloc(void *, size_t);
@@ -1071,8 +1071,8 @@
 +#define free(ptr) dhc6_free(ptr)
 +#undef strdup
 +#define strdup(str) dhc6_strdup(str)
---- /dev/null	2007-02-06 10:40:24.955607220 -0500
-+++ dhcp-0.10/libdhcp6client/dhc6_alloc.c	2007-02-09 01:02:08.000000000 -0500
+--- /dev/null	2007-03-21 18:57:18.434748430 -0400
++++ dhcp-0.10/libdhcp6client/dhc6_alloc.c	2007-03-26 10:43:55.000000000 -0400
 @@ -0,0 +1,54 @@
 +#include <malloc.h>
 +#include <search.h>
@@ -1128,8 +1128,8 @@
 +		tdestroy(ptr_tree, free);
 +    ptr_tree = NULL;
 +}
---- /dev/null	2007-02-06 10:40:24.955607220 -0500
-+++ dhcp-0.10/libdhcp6client/dhcp6client.h	2007-02-09 01:02:08.000000000 -0500
+--- /dev/null	2007-03-21 18:57:18.434748430 -0400
++++ dhcp-0.10/libdhcp6client/dhcp6client.h	2007-03-26 10:43:55.000000000 -0400
 @@ -0,0 +1,25 @@
 +/* dhcp6client.h
 + *
@@ -1156,8 +1156,8 @@
 +/* the DHCPv6 client main() function */
 +extern int dhcpv6_client(struct libdhcp_control_s *dhc_ctl,
 +                         int argc, char **argv, char **envp);
---- /dev/null	2007-02-06 10:40:24.955607220 -0500
-+++ dhcp-0.10/libdhcp6client/Makefile	2007-02-09 01:02:19.000000000 -0500
+--- /dev/null	2007-03-21 18:57:18.434748430 -0400
++++ dhcp-0.10/libdhcp6client/Makefile	2007-03-26 10:43:55.000000000 -0400
 @@ -0,0 +1,68 @@
 +#
 +# Makefile for libdhcp6client


Index: dhcpv6.spec
===================================================================
RCS file: /cvs/dist/rpms/dhcpv6/devel/dhcpv6.spec,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- dhcpv6.spec	16 Feb 2007 20:34:18 -0000	1.53
+++ dhcpv6.spec	26 Mar 2007 15:01:23 -0000	1.54
@@ -1,7 +1,7 @@
 Summary: DHCPv6 - DHCP server and client for IPv6
 Name:    dhcpv6
 Version: 0.10
-Release: 40%{?dist}
+Release: 41%{?dist}
 License: GPL 
 Group:   System Environment/Daemons
 URL:     http://dhcpv6.sourceforge.net/
@@ -9,13 +9,14 @@
 Source1: libdhcp6client.pc
 Source2: rfc3315.txt
 
-Patch0:  dhcpv6-0.10-redhat.patch
-Patch1:  dhcpv6-0.10-relay.patch
-Patch2:  dhcpv6-0.10-man.patch
-Patch3:  dhcpv6-0.10-gethwid.patch
-Patch4:  dhcpv6-0.10-no-strlcat.patch
+Patch0:  %{name}-%{version}-redhat.patch
+Patch1:  %{name}-%{version}-relay.patch
+Patch2:  %{name}-%{version}-man.patch
+Patch3:  %{name}-%{version}-gethwid.patch
+Patch4:  %{name}-%{version}-no-strlcat.patch
+Patch5:  %{name}-%{version}-salen.patch
 
-Patch99: dhcpv6-0.10-libdhcp6client.patch
+Patch99: %{name}-%{version}-libdhcp6client.patch
 
 Prereq: /sbin/chkconfig, /sbin/service
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -66,16 +67,17 @@
 %patch2 -p1 -b .man
 %patch3 -p1 -b .gethwid
 %patch4 -p1 -b .no_strlcat
+%patch5 -p1 -b .salen
 
 %patch99 -p1 -b .libdhcp6client
 
-cp -fp %{SOURCE2} docs
+%{__cp} -fp %{SOURCE2} docs
 
 # these things are part of glibc
-rm -f ifaddrs.c ifaddrs.h queue.h
+%{__rm} -f ifaddrs.c ifaddrs.h queue.h
 
 # we don't need these things
-rm -f strlcat.c
+%{__rm} -f strlcat.c
 
 autoconf
 
@@ -85,18 +87,20 @@
 %{__make} -C libdhcp6client
 
 %install
-rm -rf $RPM_BUILD_ROOT
-sed 's/@DHCPV6_VERSION@/'%{version}'/' < %{SOURCE1} > libdhcp6client.pc
-%{__make} install DESTDIR=$RPM_BUILD_ROOT \
+%{__rm} -rf %{buildroot}
+%{__sed} 's/@DHCPV6_VERSION@/'%{version}'/' < %{SOURCE1} > libdhcp6client.pc
+%{__make} install DESTDIR=%{buildroot} \
                   LIBDIR=%{_libdir} \
                   PKGCFGDIR=%{_libdir}/pkgconfig \
-                  INSTALL_USER=`id -nu` INSTALL_GROUP=`id -gn`
-%{__make} -C libdhcp6client install DESTDIR=$RPM_BUILD_ROOT \
+                  INSTALL_USER=`%{__id} -un` \
+                  INSTALL_GROUP=`%{__id} -gn`
+%{__make} -C libdhcp6client install DESTDIR=%{buildroot} \
                                     LIBDIR=%{_libdir} \
                                     PKGCFGDIR=%{_libdir}/pkgconfig \
-                                    INSTALL_USER=`id -nu` INSTALL_GROUP=`id -gn`
+                                    INSTALL_USER=`%{__id} -un` \
+                                    INSTALL_GROUP=`%{__id} -gn`
 
-mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dhcpv6
+%{__mkdir} -p %{buildroot}%{_localstatedir}/lib/%{name}
 
 %post
 chkconfig --add dhcp6s
@@ -156,6 +160,10 @@
 %{_libdir}/libdhcp6client.a
 
 %changelog
+* Mon Mar 26 2007 David Cantrell <dcantrell at redhat.com> - 0.10-41
+- Pass correct sockaddr size for salen parameter to getnameinfo() (#233900)
+- Spec file cleanups per Fedora Packaging Guidelines
+
 * Fri Feb 16 2007 David Cantrell <dcantrell at redhat.com> - 0.10-40
 - Remove strlcat(), we don't use it or need it
 - Close socket correctly in gethwid() (#229005)




More information about the fedora-cvs-commits mailing list