rpms/libnet/EL-4 libnet-1.1.2.1-odd_chksum.patch, NONE, 1.1 libnet.spec, 1.4, 1.5

Patrice Dumas (pertusus) fedora-extras-commits at redhat.com
Tue Mar 27 09:34:56 UTC 2007


Author: pertusus

Update of /cvs/extras/rpms/libnet/EL-4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv899

Modified Files:
	libnet.spec 
Added Files:
	libnet-1.1.2.1-odd_chksum.patch 
Log Message:
* Fri Jan 12 2007 Patrice Dumas <pertusus at free.fr> 1.1.2.1-7
- add debian patch to correct bad checksums


libnet-1.1.2.1-odd_chksum.patch:

--- NEW FILE libnet-1.1.2.1-odd_chksum.patch ---
--- libnet-1.1.2.1.orig/src/libnet_checksum.c
+++ libnet-1.1.2.1/src/libnet_checksum.c
@@ -42,8 +42,10 @@
 libnet_in_cksum(u_int16_t *addr, int len)
 {
     int sum;
+    u_int16_t last_byte;
 
     sum = 0;
+    last_byte = 0;
 
     while (len > 1)
     {
@@ -52,7 +54,8 @@
     }
     if (len == 1)
     {
-        sum += *(u_int16_t *)addr;
+        *(u_int8_t*)&last_byte = *(u_int8_t*)addr;
+        sum += last_byte;
     }
 
     return (sum);


Index: libnet.spec
===================================================================
RCS file: /cvs/extras/rpms/libnet/EL-4/libnet.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- libnet.spec	12 Sep 2005 21:14:48 -0000	1.4
+++ libnet.spec	27 Mar 2007 09:34:23 -0000	1.5
@@ -1,11 +1,14 @@
 Summary:        C library for portable packet creation and injection
 Name:           libnet
 Version:        1.1.2.1
-Release:        6%{?dist}
+Release:        7%{?dist}
 License:        BSD
 Group:          System Environment/Libraries
 URL:            http://www.packetfactory.net/libnet/
 Source0:        http://www.packetfactory.net/libnet/dist/libnet-%{version}.tar.gz
+# excerpted from debian patcheset
+Patch0:         libnet-1.1.2.1-odd_chksum.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
@@ -34,6 +37,7 @@
 
 %prep
 %setup -q -n libnet
+%patch0 -p1 -b odd_chksum
 sed -i -e 's/\r$//' doc/CHANGELOG doc/CONTRIB
 find . -depth -type d -name CVS -exec rm -rf {} ';'
 rm -rf sample/win32
@@ -71,25 +75,28 @@
 %{_mandir}/man3/libnet*
 
 %changelog
-* Mon Sep 12 2005 Patrice Dumas <dumas at centre-cired.fr> 1.1.2.1-6
+* Fri Jan 12 2007 Patrice Dumas <pertusus at free.fr> 1.1.2.1-7
+- add debian patch to correct bad checksums
+
+* Mon Sep 12 2005 Patrice Dumas <pertusus at free.fr> 1.1.2.1-6
 - bump release and add dist tag
 
 * Tue Aug 30 2005 Paul Howarth <paul at city-fan.org> 1.1.2.1-5
 - spec file cleanup
 
-* Fri Aug 26 2005 Patrice Dumas <dumas at centre-cired.fr> 1.1.2.1-4
+* Fri Aug 26 2005 Patrice Dumas <pertusus at free.fr> 1.1.2.1-4
 - use pushd and popd (from Oliver Falk) 
 
-* Mon Aug 22 2005 Patrice Dumas <dumas at centre-cired.fr> 1.1.2.1-3
+* Mon Aug 22 2005 Patrice Dumas <pertusus at free.fr> 1.1.2.1-3
 - Correct dos end of lines
-- add in devel: Provides: %{name} = %{version}-%{release} 
+- add in devel: Provides: %%{name} = %%{version}-%%{release} 
 
-* Fri Aug 12 2005 Patrice Dumas <dumas at centre-cired.fr> 1.1.2.1-2
+* Fri Aug 12 2005 Patrice Dumas <pertusus at free.fr> 1.1.2.1-2
 - put everything in a devel subpackage
 - add smpflags
 - clean in sample
 
-* Fri Aug 12 2005 Patrice Dumas <dumas at centre-cired.fr> 1.1.2.1-1
+* Fri Aug 12 2005 Patrice Dumas <pertusus at free.fr> 1.1.2.1-1
 - rebuild changing only name
 
 * Wed Jun 02 2004 Marcin Garski <garski at poczta.onet.pl> 1.1.2.1-2.fc2




More information about the fedora-extras-commits mailing list