diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-07-27 20:23:53 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-07-27 20:23:53 -0300 |
commit | 3a3f329b736af639fdd3c9621816bad627b96903 (patch) | |
tree | a0935f38e21136a3b7eeb93d0ec5c449c12de5b0 /testing/iptables | |
parent | 4d788e769855cbef2539d7cf7049dc2b4d9ac2e0 (diff) | |
parent | 2c30604c9ff749660a4b8507eec99e679cf19508 (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community-staging/kdenlive/PKGBUILD
community-staging/openscenegraph/PKGBUILD
community-staging/schroot/PKGBUILD
community-staging/wt/PKGBUILD
community-testing/cdfs/PKGBUILD
community-testing/pingus/PKGBUILD
community-testing/tagpy/PKGBUILD
community-testing/vhba-module/PKGBUILD
community-testing/vhba-module/vhba-module.install
community/surf/PKGBUILD
community/unpaper/PKGBUILD
core/flex/PKGBUILD
core/gcc/PKGBUILD
extra/boost/PKGBUILD
extra/cups/PKGBUILD
extra/gnutls/PKGBUILD
extra/gtk2/PKGBUILD
extra/llvm/PKGBUILD
extra/mesa/PKGBUILD
extra/qt/PKGBUILD
kde-unstable/akonadi/PKGBUILD
kde-unstable/kdeplasma-addons/PKGBUILD
libre/virtualbox-libre/PKGBUILD
multilib/gcc-multilib/PKGBUILD
multilib/lib32-libpng/PKGBUILD
testing/bind/PKGBUILD
testing/dnsutils/PKGBUILD
testing/iptables/PKGBUILD
testing/nouveau-dri/PKGBUILD
Diffstat (limited to 'testing/iptables')
-rw-r--r-- | testing/iptables/0503-extension_cppflags.patch | 13 | ||||
-rw-r--r-- | testing/iptables/ip6tables.service | 11 | ||||
-rw-r--r-- | testing/iptables/iptables-1.4.12-fixresore.patch | 28 | ||||
-rwxr-xr-x | testing/iptables/iptables-flush | 18 | ||||
-rw-r--r-- | testing/iptables/iptables.service | 11 |
5 files changed, 81 insertions, 0 deletions
diff --git a/testing/iptables/0503-extension_cppflags.patch b/testing/iptables/0503-extension_cppflags.patch new file mode 100644 index 000000000..0eb645731 --- /dev/null +++ b/testing/iptables/0503-extension_cppflags.patch @@ -0,0 +1,13 @@ +Index: b/extensions/GNUmakefile.in +=================================================================== +--- a/extensions/GNUmakefile.in 2012-03-27 12:14:05.000000000 -0400 ++++ b/extensions/GNUmakefile.in 2012-03-27 16:03:48.378790221 -0400 +@@ -21,7 +21,7 @@ + kinclude_CPPFLAGS = @kinclude_CPPFLAGS@ + + AM_CFLAGS = ${regular_CFLAGS} +-AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS} ++AM_CPPFLAGS = ${CPPFLAGS} ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS} + AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@ + AM_LDFLAGS = @noundef_LDFLAGS@ + diff --git a/testing/iptables/ip6tables.service b/testing/iptables/ip6tables.service new file mode 100644 index 000000000..9a695f31e --- /dev/null +++ b/testing/iptables/ip6tables.service @@ -0,0 +1,11 @@ +[Unit] +Description=IPv6 Packet Filtering Framework + +[Service] +Type=oneshot +ExecStart=/usr/sbin/ip6tables-restore /etc/iptables/ip6tables.rules +ExecStop=/usr/lib/systemd/scripts/iptables-flush 6 +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/testing/iptables/iptables-1.4.12-fixresore.patch b/testing/iptables/iptables-1.4.12-fixresore.patch new file mode 100644 index 000000000..94358f779 --- /dev/null +++ b/testing/iptables/iptables-1.4.12-fixresore.patch @@ -0,0 +1,28 @@ +diff -Nur iptables-1.4.12.2/iptables/ip6tables-restore.c iptables-1.4.12.2-fixrestore/iptables/ip6tables-restore.c +--- iptables-1.4.12.2/iptables/ip6tables-restore.c 2012-01-03 02:19:09.000000000 +0900 ++++ iptables-1.4.12.2-fixrestore/iptables/ip6tables-restore.c 2012-03-01 10:56:10.000000000 +0900 +@@ -380,9 +380,9 @@ + quote_open = 0; + escaped = 0; + param_len = 0; ++ char param_buffer[1024]; + + for (curchar = parsestart; *curchar; curchar++) { +- char param_buffer[1024]; + + if (quote_open) { + if (escaped) { +diff -Nur iptables-1.4.12.2/iptables/iptables-restore.c iptables-1.4.12.2-fixrestore/iptables/iptables-restore.c +--- iptables-1.4.12.2/iptables/iptables-restore.c 2012-01-03 02:19:09.000000000 +0900 ++++ iptables-1.4.12.2-fixrestore/iptables/iptables-restore.c 2012-03-01 10:56:00.000000000 +0900 +@@ -377,9 +377,9 @@ + quote_open = 0; + escaped = 0; + param_len = 0; ++ char param_buffer[1024]; + + for (curchar = parsestart; *curchar; curchar++) { +- char param_buffer[1024]; + + if (quote_open) { + if (escaped) { diff --git a/testing/iptables/iptables-flush b/testing/iptables/iptables-flush new file mode 100755 index 000000000..e6fafe950 --- /dev/null +++ b/testing/iptables/iptables-flush @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Usage: iptables-flush [6] +# + +iptables=ip$1tables +if ! type -p "$iptables"; then + echo "error: invalid argument" + exit 1 +fi + +while read -r table; do + tables+=("/var/lib/$iptables/empty-$table.rules") +done <"/proc/net/ip$1_tables_names" + +if (( ${#tables[*]} )); then + cat "${tables[@]}" | "$iptables-restore" +fi diff --git a/testing/iptables/iptables.service b/testing/iptables/iptables.service new file mode 100644 index 000000000..3084f53b7 --- /dev/null +++ b/testing/iptables/iptables.service @@ -0,0 +1,11 @@ +[Unit] +Description=Packet Filtering Framework + +[Service] +Type=oneshot +ExecStart=/usr/sbin/iptables-restore /etc/iptables/iptables.rules +ExecStop=/usr/lib/systemd/scripts/iptables-flush +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target |