summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-11-30 07:27:14 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-12-03 15:14:18 +0000
commit6ad67d9db4d17fb12b1ef0c3901998c84b6d1e36 (patch)
tree185a4ac772a94bdea90f7885749ab95fba8c3af6
parentf67d6506c9f4bc7e8dfd07749b7c884540c2447f (diff)
downloadaports-6ad67d9db4d17fb12b1ef0c3901998c84b6d1e36.tar.bz2
aports-6ad67d9db4d17fb12b1ef0c3901998c84b6d1e36.tar.xz
main/linux-grsec: add xfrm patch
(cherry picked from commit 6c90774120dc94780fa3a5dee5efac9303786fa4)
-rw-r--r--main/linux-grsec/APKBUILD4
-rw-r--r--main/linux-grsec/xfrm-fix-gre-key-endianess.patch43
2 files changed, 46 insertions, 1 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index 629cb9ff9..996479b19 100644
--- a/main/linux-grsec/APKBUILD
+++ b/main/linux-grsec/APKBUILD
@@ -4,7 +4,7 @@ _flavor=grsec
pkgname=linux-${_flavor}
pkgver=2.6.35.8
_kernver=2.6.35
-pkgrel=4
+pkgrel=5
pkgdesc="Linux kernel with grsecurity"
url=http://grsecurity.net
depends="mkinitfs linux-firmware"
@@ -16,6 +16,7 @@ source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2
grsecurity-2.2.0-2.6.35.8-201011062054.patch
0001-xfrm-use-gre-key-as-flow-upper-protocol-info.patch
+ xfrm-fix-gre-key-endianess.patch
0004-arp-flush-arp-cache-on-device-change.patch
r8169-fix-rx-checksum-offload.patch
r8169-add-gro-support.patch
@@ -145,6 +146,7 @@ md5sums="091abeb4684ce03d1d936851618687b6 linux-2.6.35.tar.bz2
198e4e72ea9cc7f9f25bb5881167aa2e patch-2.6.35.8.bz2
d5832cb57522a666a80227f68b771552 grsecurity-2.2.0-2.6.35.8-201011062054.patch
eed5bd98c0a3b976891c897763eceff5 0001-xfrm-use-gre-key-as-flow-upper-protocol-info.patch
+ea7a7eb2775b71ae5ef24d029a4905bd xfrm-fix-gre-key-endianess.patch
776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch
0ccecafd4123dcad0b0cd7787553d734 r8169-fix-rx-checksum-offload.patch
139b39da44ecb577275be53d7d365949 r8169-add-gro-support.patch
diff --git a/main/linux-grsec/xfrm-fix-gre-key-endianess.patch b/main/linux-grsec/xfrm-fix-gre-key-endianess.patch
new file mode 100644
index 000000000..362484a76
--- /dev/null
+++ b/main/linux-grsec/xfrm-fix-gre-key-endianess.patch
@@ -0,0 +1,43 @@
+From aa285b1740f5b13e5a2606a927f3129954583d78 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Tue, 23 Nov 2010 04:03:45 +0000
+Subject: [PATCH] xfrm: fix gre key endianess
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+fl->fl_gre_key is network byte order contrary to fl->fl_icmp_*.
+Make xfrm_flowi_{s|d}port return network byte order values for gre
+key too.
+
+Signed-off-by: Timo Teräs <timo.teras@iki.fi>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ include/net/xfrm.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/net/xfrm.h b/include/net/xfrm.h
+index 54b2832..7fa5b00 100644
+--- a/include/net/xfrm.h
++++ b/include/net/xfrm.h
+@@ -806,7 +806,7 @@ __be16 xfrm_flowi_sport(struct flowi *fl)
+ port = htons(fl->fl_mh_type);
+ break;
+ case IPPROTO_GRE:
+- port = htonl(fl->fl_gre_key) >> 16;
++ port = htons(ntohl(fl->fl_gre_key) >> 16);
+ break;
+ default:
+ port = 0; /*XXX*/
+@@ -830,7 +830,7 @@ __be16 xfrm_flowi_dport(struct flowi *fl)
+ port = htons(fl->fl_icmp_code);
+ break;
+ case IPPROTO_GRE:
+- port = htonl(fl->fl_gre_key) & 0xffff;
++ port = htons(ntohl(fl->fl_gre_key) & 0xffff);
+ break;
+ default:
+ port = 0; /*XXX*/
+--
+1.7.3.2
+