[arptables_jf/f17] arptables-save was swapping bytes in the arpop (#891769)

Jiří Popelka jpopelka at fedoraproject.org
Tue Jan 8 18:35:53 UTC 2013


commit 1e707385cd98fcc710b1d3fda54a8ee4dd2047c6
Author: Jiri Popelka <jpopelka at redhat.com>
Date:   Tue Jan 8 19:35:40 2013 +0100

    arptables-save was swapping bytes in the arpop (#891769)

 arptables_jf-0.0.8-byteorder.patch |   19 +++++++++++++++++++
 arptables_jf.spec                  |    5 ++++-
 2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/arptables_jf-0.0.8-byteorder.patch b/arptables_jf-0.0.8-byteorder.patch
index 91c3ad4..7d7275e 100644
--- a/arptables_jf-0.0.8-byteorder.patch
+++ b/arptables_jf-0.0.8-byteorder.patch
@@ -48,3 +48,22 @@ diff -Naur arptables_jf-0.0.8.orig/arptables.c arptables_jf-0.0.8.new/arptables.
  	if ( *p == '/' ) {
  	    p++;
  	    ch1 = p[0];
+diff -up arptables_jf-0.0.8/arptables-save.c.byteorder arptables_jf-0.0.8/arptables-save.c
+--- arptables_jf-0.0.8/arptables-save.c.byteorder	2013-01-08 19:14:01.000000000 +0100
++++ arptables_jf-0.0.8/arptables-save.c	2013-01-08 19:16:39.333712621 +0100
+@@ -171,12 +171,12 @@ static void print_rule(const struct arpt
+         print_uint8 ( "-a", e->arp.arhln, e->arp.arhln_mask,
+  e->arp.invflags & ARPT_INV_ARPHLN );
+ 
+-	print_uint16 ( "-p", e->arp.arpop, e->arp.arpop_mask,
++	print_uint16 ( "-p", ntohs(e->arp.arpop), ntohs(e->arp.arpop_mask),
+  e->arp.invflags & ARPT_INV_ARPOP );
+ 
+-        print_uint16 ( "-H", e->arp.arhrd, e->arp.arhrd_mask,
++        print_uint16 ( "-H", ntohs(e->arp.arhrd), ntohs(e->arp.arhrd_mask),
+  e->arp.invflags & ARPT_INV_ARPHRD );
+-        print_uint16 ( "-w", e->arp.arpro, e->arp.arpro_mask,
++        print_uint16 ( "-w", ntohs(e->arp.arpro), ntohs(e->arp.arpro_mask),
+  e->arp.invflags & ARPT_INV_ARPPRO );
+ 
+         print_hwaddr_and_mask ( "-z", e->arp.src_devaddr.addr, e->arp.src_devaddr.mask,
diff --git a/arptables_jf.spec b/arptables_jf.spec
index d182fb5..e3930a9 100644
--- a/arptables_jf.spec
+++ b/arptables_jf.spec
@@ -3,7 +3,7 @@ Summary: Userspace control program for the arptables network filter
 Name: arptables_jf
 
 Version: 0.0.8
-Release: 24%{?dist}
+Release: 25%{?dist}
 Source: %{name}-%{version}.tbz
 #Source1: Makefile
 #Source2: arptables.h
@@ -78,6 +78,9 @@ fi
 
 
 %changelog
+* Tue Jan 08 2013 Jiri Popelka <jpopelka at redhat.com> - 0.0.8-25
+- arptables-save was swapping bytes in the arpop (#891769)
+
 * Thu Jan 12 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.0.8-24
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list