aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2015-03-11 00:21:06 +0000
committerStuart Shelton <stuart@shelton.me>2015-03-11 00:21:06 +0000
commitb054d7c21e4b0d41575bc9a1320e663c3c2b3855 (patch)
treef1ed63b76e40e76dccf05e8b75d80e73e7dca750 /net-firewall
parentUpdate dev-libs/gmp-6.0.0a (diff)
downloadsrcshelton-b054d7c21e4b0d41575bc9a1320e663c3c2b3855.tar.gz
srcshelton-b054d7c21e4b0d41575bc9a1320e663c3c2b3855.tar.bz2
srcshelton-b054d7c21e4b0d41575bc9a1320e663c3c2b3855.zip
Update net-firewall/ebtables-9999 with ebt_among patch
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/ebtables/Manifest3
-rw-r--r--net-firewall/ebtables/ebtables-9999.ebuild3
-rw-r--r--net-firewall/ebtables/files/ebtables-2.0.10.4-ebt_among.c.patch56
3 files changed, 61 insertions, 1 deletions
diff --git a/net-firewall/ebtables/Manifest b/net-firewall/ebtables/Manifest
index 7be34ac4..2ccd1a80 100644
--- a/net-firewall/ebtables/Manifest
+++ b/net-firewall/ebtables/Manifest
@@ -1,4 +1,5 @@
+AUX ebtables-2.0.10.4-ebt_among.c.patch 1832 SHA256 affc8ed2c11da95124bf1b3313d5dc895262b3ec7a49044e2465982fe69942d3 SHA512 e542cbc4d9650afe7ead2f53601acaf4584c67489cc1351df60ffdcc947b17561cb642a2e218112001fd68159b31ebd32a91a92b249cec613ec1be935fa9aaca WHIRLPOOL 01d4ad1756eb9e3e579fcee76ca0b85ebf16acb5fd243faf1994d6c3c80b84d583772d1fe51e488e7420246054e36b09515ab9a9ea7a1d8660953997fce415b8
AUX ebtables-2.0.8.1-ebt-save.diff 1089 SHA256 b4d7022a616152ca439d2b09f14fda8a3ef479b823c2da44eb0e9e22b256be90 SHA512 904cb936ca6fc39dc4fa6e287ef70df9e1dacbd9dc464f839f25213f5525d4020f819dd893b784c5f611f1185c05ffbaa49423afcd6db2ef328950408a07e6a7 WHIRLPOOL df0664bc20dcd36bf640c8c88dea1e7d17b55c686403bceb77f5416b95ce0e2fc3292755e5986822b794628fc31aff25f7dab4d70d742fc93e78bac9fcdea4b2
AUX ebtables.confd-r1 477 SHA256 666ba2b2ed0886a603ad36d0773192887b11b50def2465512ee18204675f42cb SHA512 4e44656d761e70afe1fba103dbfdd428e4bf9b98d17f7982a9a10e443916bdf5c526851f20bafb2450a37b069eee99b4179ed28b5f4c8884a3bab19155dd748d WHIRLPOOL 1f084ccfb6c2d1a817fd8db747cd60426502d9782ad74662b7e9f43cd737d92c8e7814d662b9f2a7b91ccdbd987791b38a61fee20509d9c2f0d693a4169f9247
AUX ebtables.initd-r1 2119 SHA256 a36c58b9dc8afc62dd67fd69ef924953ac1613e14a1c3bce4fd0e9394a78a227 SHA512 c37d4a03e00f8e2e5e08d1a25ec1035f7a8e0736752733cb8621a98bfc87780445e4694082ccb4ce8760bc51acd7b5a760672376bde13f292062526c8cb3bdbe WHIRLPOOL 2318d01056062cc04760f3c51af3cabd6d33d6f3692adb33fba033f44f5853a8cfed736e2dc77a78619a4af92f5673100cfe90517afc3e7262bb5ad7d2505bff
-EBUILD ebtables-9999.ebuild 2121 SHA256 c8d76d71a31e9085b0b680cf3345d22b0cecfd3ec1fac69bda94a915b322af29 SHA512 ee1b2deca666561ef3d6b0dc633e08ae5949be480215ff1019ae3018fabae9a0363683dac6093c8c9d42c709e23b1192cf0018acf62bdadd45c3eef60ccfd9d2 WHIRLPOOL f021616f7e614b06f7a2ebe1915be9dd0bb2d1ffe5a451ff8d50e35506c38b1ef71b0b22ea8049eb71f79b6125919e95c1ed550c6a246f76088f044f5b4a054b
+EBUILD ebtables-9999.ebuild 2252 SHA256 c992dbce3a5f94018cfcc606761b29750fa4530774307a92a461186b387b3678 SHA512 ccdb771c2afb5c7b216e95a7fb1793525054fce48b84d0c24338cbdcd43263891a83fda165e25db412d758cb4a925db4da4fd6fa397143c1a94e606f43f75cd3 WHIRLPOOL 8e6bc57ba83c6a2aff4b0d6939e614d4129e4957ea96a39459647f60f1df72ae9f8de31e1617b2f14c0e41f68b1994076f7a0ef0a6a9f86d25bdd08bc0f39476
diff --git a/net-firewall/ebtables/ebtables-9999.ebuild b/net-firewall/ebtables/ebtables-9999.ebuild
index bb8a6527..41ac5948 100644
--- a/net-firewall/ebtables/ebtables-9999.ebuild
+++ b/net-firewall/ebtables/ebtables-9999.ebuild
@@ -27,6 +27,9 @@ src_prepare() {
# Enhance ebtables-save to take table names as parameters bug #189315
epatch "${FILESDIR}/${PN}-2.0.8.1-ebt-save.diff"
+ # Allow multi-line MAC/IP files for --among-src-file and --among-dst-file
+ epatch "${FILESDIR}/${PN}-2.0.10.4-ebt_among.c.patch"
+
sed -i -e "s,^MANDIR:=.*,MANDIR:=/usr/share/man," \
-e "s,^BINDIR:=.*,BINDIR:=/sbin," \
-e "s,^INITDIR:=.*,INITDIR:=/usr/share/doc/${PF}," \
diff --git a/net-firewall/ebtables/files/ebtables-2.0.10.4-ebt_among.c.patch b/net-firewall/ebtables/files/ebtables-2.0.10.4-ebt_among.c.patch
new file mode 100644
index 00000000..c0e5fcfd
--- /dev/null
+++ b/net-firewall/ebtables/files/ebtables-2.0.10.4-ebt_among.c.patch
@@ -0,0 +1,56 @@
+--- extensions/ebt_among.c.dist 2015-03-10 23:54:32.224146486 +0000
++++ extensions/ebt_among.c 2015-03-10 23:59:00.200050809 +0000
+@@ -197,7 +197,7 @@
+
+ /* collect MAC; all its bytes are followed by ':' (colon),
+ * except for the last one which can be followed by
+- * ',' (comma), '=' or '\0' */
++ * ',' (comma), '=', newline or '\0' */
+ for (i = 0; i < 5; i++) {
+ if (read_until(&pc, ":", token, 2) < 0
+ || token[0] == 0) {
+@@ -213,7 +213,7 @@
+ }
+ pc++;
+ }
+- if (read_until(&pc, "=,", token, 2) == -2 || token[0] == 0) {
++ if (read_until(&pc, "=,\n", token, 2) == -2 || token[0] == 0) {
+ ebt_print_error("MAC parse error: %.20s", anchor);
+ return NULL;
+ }
+@@ -238,7 +238,7 @@
+ }
+ pc++;
+ }
+- if (read_until(&pc, ",", token, 3) == -2 || token[0] == 0) {
++ if (read_until(&pc, ",\n", token, 3) == -2 || token[0] == 0) {
+ ebt_print_error("IP parse error: %.20s", anchor);
+ return NULL;
+ }
+@@ -279,14 +279,14 @@
+ /* now `pc' points to comma if we are here; */
+ /* increment this to the next char */
+ /* but first assert :-> */
+- if (*pc != ',') {
+- ebt_print_error("Something went wrong; no comma...\n");
++ if (*pc != ',' && *pc != '\n') {
++ ebt_print_error("Something went wrong; no comma or newline...\n");
+ return NULL;
+ }
+ pc++;
+
+ /* again check if end of string was reached; */
+- /* we allow an ending comma */
++ /* we allow an ending comma or newline */
+ if (!*pc) {
+ break;
+ }
+@@ -345,8 +345,6 @@
+ ebt_print_error("Couldn't map file to memory");
+ if (optarg[flen-1] != '\n')
+ ebt_print_error("File should end with a newline");
+- if (strchr(optarg, '\n') != optarg+flen-1)
+- ebt_print_error("File should only contain one line");
+ optarg[flen-1] = '\0';
+ if (ebt_errormsg[0] != '\0') {
+ munmap(argv, flen);