]> git.pld-linux.org Git - packages/ipset.git/commitdiff
- ipset: Fix interface name matching in hash:net,iface.
authorkosmo <kosmo@pld-linux.org>
Sat, 13 Aug 2011 12:00:24 +0000 (12:00 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ipset-hash-net-if-fix.patch -> 1.1
    ipset.spec -> 1.126

ipset-hash-net-if-fix.patch [new file with mode: 0644]
ipset.spec

diff --git a/ipset-hash-net-if-fix.patch b/ipset-hash-net-if-fix.patch
new file mode 100644 (file)
index 0000000..dc75fb7
--- /dev/null
@@ -0,0 +1,30 @@
+diff -urN ipset-6.8.orig/kernel/net/netfilter/ipset/ip_set_hash_netiface.c ipset-6.8/kernel/net/netfilter/ipset/ip_set_hash_netiface.c
+--- ipset-6.8.orig/kernel/net/netfilter/ipset/ip_set_hash_netiface.c   2011-07-08 10:13:53.000000000 +0200
++++ ipset-6.8/kernel/net/netfilter/ipset/ip_set_hash_netiface.c        2011-08-13 09:58:01.456999822 +0200
+@@ -41,25 +41,7 @@
+ static inline long
+ ifname_compare(const char *_a, const char *_b)
+ {
+-      const long *a = (const long *)_a;
+-      const long *b = (const long *)_b;
+-
+-      BUILD_BUG_ON(IFNAMSIZ > 4 * sizeof(unsigned long));
+-      if (a[0] != b[0])
+-              return a[0] - b[0];
+-      if (IFNAMSIZ > sizeof(long)) {
+-              if (a[1] != b[1])
+-                      return a[1] - b[1];
+-      }
+-      if (IFNAMSIZ > 2 * sizeof(long)) {
+-              if (a[2] != b[2])
+-                      return a[2] - b[2];
+-      }
+-      if (IFNAMSIZ > 3 * sizeof(long)) {
+-              if (a[3] != b[3])
+-                      return a[3] - b[3];
+-      }
+-      return 0;
++      return strcmp(_a, _b);
+ }
+ static void
index df36ee8b0e3ef5f3b0745bb0b24647ff14fb5ac5..b359e4aa58a6fcc3186a29e4938c0f9dc948db01 100644 (file)
@@ -35,6 +35,7 @@ Source0:      http://ipset.netfilter.org/%{pname}-%{version}.tar.bz2
 Source1:       %{pname}.init
 Patch0:                %{pname}-config_dist.patch
 Patch1:                %{pname}-no_kernel.patch
+Patch2:                %{pname}-hash-net-if-fix.patch
 URL:           http://ipset.netfilter.org/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
@@ -138,6 +139,7 @@ Ten pakiet zawiera moduły jądra oferujące wsparcie dla zbiorów IP.
 %else
 %patch1 -p1
 %endif
+%patch2 -p1
 
 %build
 %{__libtoolize}
This page took 0.043988 seconds and 4 git commands to generate.