rpms/ntp/devel ntp-4.2.4p4-cmsgalign.patch, NONE, 1.1 ntp-4.2.4p4-bcast.patch, 1.1, 1.2 ntp.spec, 1.78, 1.79

Miroslav Lichvar (mlichvar) fedora-extras-commits at redhat.com
Mon Mar 10 19:48:49 UTC 2008


Author: mlichvar

Update of /cvs/pkgs/rpms/ntp/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21704

Modified Files:
	ntp-4.2.4p4-bcast.patch ntp.spec 
Added Files:
	ntp-4.2.4p4-cmsgalign.patch 
Log Message:
- avoid unaligned memory access (#435301)
- fix receiving broadcasts on 255.255.255.255


ntp-4.2.4p4-cmsgalign.patch:

--- NEW FILE ntp-4.2.4p4-cmsgalign.patch ---
diff -up ntp-4.2.4p4/ntpd/ntp_io.c.cmsgalign ntp-4.2.4p4/ntpd/ntp_io.c
--- ntp-4.2.4p4/ntpd/ntp_io.c.cmsgalign	2008-03-10 20:01:21.000000000 +0100
+++ ntp-4.2.4p4/ntpd/ntp_io.c	2008-03-10 20:04:02.000000000 +0100
@@ -2933,8 +2933,8 @@ read_network_packet(SOCKET fd, struct in
 	msghdr.msg_namelen    = sizeof(rb->recv_srcadr);
 	msghdr.msg_iov        = &iovec;
 	msghdr.msg_iovlen     = 1;
-	msghdr.msg_control    = (void *)&control;
-	msghdr.msg_controllen = sizeof(control);
+	msghdr.msg_control    = (void *)((long)(control + 7) & -8); /* align to 8 bytes */
+	msghdr.msg_controllen = sizeof(control) - 8;
 	msghdr.msg_flags      = 0;
 	rb->recv_length       = recvmsg(fd, &msghdr, 0);
 #endif

ntp-4.2.4p4-bcast.patch:

Index: ntp-4.2.4p4-bcast.patch
===================================================================
RCS file: /cvs/pkgs/rpms/ntp/devel/ntp-4.2.4p4-bcast.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ntp-4.2.4p4-bcast.patch	26 Oct 2007 13:27:54 -0000	1.1
+++ ntp-4.2.4p4-bcast.patch	10 Mar 2008 19:48:46 -0000	1.2
@@ -66,8 +66,8 @@
  	struct msghdr msghdr;
  	struct iovec iovec;
 -	char control[TIMESTAMP_CTLMSGBUF_SIZE];	/* pick up control messages */
-+	char control[sizeof (struct cmsghdr) +
-+		sizeof (struct in_pktinfo) + 8];	/* pick up control messages */
++	char control[sizeof (struct cmsghdr) * 2 + sizeof (struct timeval) +
++		sizeof (struct in_pktinfo) + 32];	/* pick up control messages */
  #endif
  
  	/*


Index: ntp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ntp/devel/ntp.spec,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- ntp.spec	10 Mar 2008 15:44:55 -0000	1.78
+++ ntp.spec	10 Mar 2008 19:48:46 -0000	1.79
@@ -60,6 +60,7 @@
 Patch19: ntp-4.2.4p0-retcode.patch
 Patch20: ntp-4.2.4p2-noif.patch
 Patch21: ntp-4.2.4p4-ipv6.patch
+Patch22: ntp-4.2.4p4-cmsgalign.patch
 
 URL: http://www.ntp.org
 Requires(pre): shadow-utils 
@@ -105,6 +106,7 @@
 %patch19 -p1 -b .retcode
 %patch20 -p1 -b .noif
 %patch21 -p1 -b .ipv6
+%patch22 -p1 -b .cmsgalign
 
 %ifarch ia64
 %patch5 -p1 -b .linkfastmath
@@ -243,6 +245,8 @@
 %changelog
 * Mon Mar 10 2008 Miroslav Lichvar <mlichvar at redhat.com> 4.2.4p4-5
 - fix building IPv6 support with new glibc-headers (#436713)
+- avoid unaligned memory access (#435301)
+- fix receiving broadcasts on 255.255.255.255
 
 * Fri Feb 29 2008 Miroslav Lichvar <mlichvar at redhat.com> 4.2.4p4-4
 - reset kernel frequency when -x option is used




More information about the fedora-extras-commits mailing list