[arch-commits] Commit in iptables/repos (34 files)

Evangelos Foutras foutrelis at nymeria.archlinux.org
Tue Mar 12 15:32:17 UTC 2013


    Date: Tuesday, March 12, 2013 @ 16:32:17
  Author: foutrelis
Revision: 179929

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  iptables/repos/testing-i686/
  iptables/repos/testing-i686/0503-extension_cppflags.patch
    (from rev 179928, iptables/trunk/0503-extension_cppflags.patch)
  iptables/repos/testing-i686/PKGBUILD
    (from rev 179928, iptables/trunk/PKGBUILD)
  iptables/repos/testing-i686/empty-filter.rules
    (from rev 179928, iptables/trunk/empty-filter.rules)
  iptables/repos/testing-i686/empty-mangle.rules
    (from rev 179928, iptables/trunk/empty-mangle.rules)
  iptables/repos/testing-i686/empty-nat.rules
    (from rev 179928, iptables/trunk/empty-nat.rules)
  iptables/repos/testing-i686/empty-raw.rules
    (from rev 179928, iptables/trunk/empty-raw.rules)
  iptables/repos/testing-i686/empty-security.rules
    (from rev 179928, iptables/trunk/empty-security.rules)
  iptables/repos/testing-i686/empty.rules
    (from rev 179928, iptables/trunk/empty.rules)
  iptables/repos/testing-i686/ip6tables
    (from rev 179928, iptables/trunk/ip6tables)
  iptables/repos/testing-i686/ip6tables.service
    (from rev 179928, iptables/trunk/ip6tables.service)
  iptables/repos/testing-i686/iptables
    (from rev 179928, iptables/trunk/iptables)
  iptables/repos/testing-i686/iptables-1.4.12-fixresore.patch
    (from rev 179928, iptables/trunk/iptables-1.4.12-fixresore.patch)
  iptables/repos/testing-i686/iptables-flush
    (from rev 179928, iptables/trunk/iptables-flush)
  iptables/repos/testing-i686/iptables.conf.d
    (from rev 179928, iptables/trunk/iptables.conf.d)
  iptables/repos/testing-i686/iptables.service
    (from rev 179928, iptables/trunk/iptables.service)
  iptables/repos/testing-i686/simple_firewall.rules
    (from rev 179928, iptables/trunk/simple_firewall.rules)
  iptables/repos/testing-x86_64/
  iptables/repos/testing-x86_64/0503-extension_cppflags.patch
    (from rev 179928, iptables/trunk/0503-extension_cppflags.patch)
  iptables/repos/testing-x86_64/PKGBUILD
    (from rev 179928, iptables/trunk/PKGBUILD)
  iptables/repos/testing-x86_64/empty-filter.rules
    (from rev 179928, iptables/trunk/empty-filter.rules)
  iptables/repos/testing-x86_64/empty-mangle.rules
    (from rev 179928, iptables/trunk/empty-mangle.rules)
  iptables/repos/testing-x86_64/empty-nat.rules
    (from rev 179928, iptables/trunk/empty-nat.rules)
  iptables/repos/testing-x86_64/empty-raw.rules
    (from rev 179928, iptables/trunk/empty-raw.rules)
  iptables/repos/testing-x86_64/empty-security.rules
    (from rev 179928, iptables/trunk/empty-security.rules)
  iptables/repos/testing-x86_64/empty.rules
    (from rev 179928, iptables/trunk/empty.rules)
  iptables/repos/testing-x86_64/ip6tables
    (from rev 179928, iptables/trunk/ip6tables)
  iptables/repos/testing-x86_64/ip6tables.service
    (from rev 179928, iptables/trunk/ip6tables.service)
  iptables/repos/testing-x86_64/iptables
    (from rev 179928, iptables/trunk/iptables)
  iptables/repos/testing-x86_64/iptables-1.4.12-fixresore.patch
    (from rev 179928, iptables/trunk/iptables-1.4.12-fixresore.patch)
  iptables/repos/testing-x86_64/iptables-flush
    (from rev 179928, iptables/trunk/iptables-flush)
  iptables/repos/testing-x86_64/iptables.conf.d
    (from rev 179928, iptables/trunk/iptables.conf.d)
  iptables/repos/testing-x86_64/iptables.service
    (from rev 179928, iptables/trunk/iptables.service)
  iptables/repos/testing-x86_64/simple_firewall.rules
    (from rev 179928, iptables/trunk/simple_firewall.rules)

------------------------------------------------+
 testing-i686/0503-extension_cppflags.patch     |   13 +++
 testing-i686/PKGBUILD                          |   87 +++++++++++++++++++++++
 testing-i686/empty-filter.rules                |    6 +
 testing-i686/empty-mangle.rules                |    8 ++
 testing-i686/empty-nat.rules                   |    7 +
 testing-i686/empty-raw.rules                   |    5 +
 testing-i686/empty-security.rules              |    6 +
 testing-i686/empty.rules                       |    6 +
 testing-i686/ip6tables                         |   69 ++++++++++++++++++
 testing-i686/ip6tables.service                 |   12 +++
 testing-i686/iptables                          |   68 +++++++++++++++++
 testing-i686/iptables-1.4.12-fixresore.patch   |   28 +++++++
 testing-i686/iptables-flush                    |   18 ++++
 testing-i686/iptables.conf.d                   |   12 +++
 testing-i686/iptables.service                  |   12 +++
 testing-i686/simple_firewall.rules             |   11 ++
 testing-x86_64/0503-extension_cppflags.patch   |   13 +++
 testing-x86_64/PKGBUILD                        |   87 +++++++++++++++++++++++
 testing-x86_64/empty-filter.rules              |    6 +
 testing-x86_64/empty-mangle.rules              |    8 ++
 testing-x86_64/empty-nat.rules                 |    7 +
 testing-x86_64/empty-raw.rules                 |    5 +
 testing-x86_64/empty-security.rules            |    6 +
 testing-x86_64/empty.rules                     |    6 +
 testing-x86_64/ip6tables                       |   69 ++++++++++++++++++
 testing-x86_64/ip6tables.service               |   12 +++
 testing-x86_64/iptables                        |   68 +++++++++++++++++
 testing-x86_64/iptables-1.4.12-fixresore.patch |   28 +++++++
 testing-x86_64/iptables-flush                  |   18 ++++
 testing-x86_64/iptables.conf.d                 |   12 +++
 testing-x86_64/iptables.service                |   12 +++
 testing-x86_64/simple_firewall.rules           |   11 ++
 32 files changed, 736 insertions(+)

Copied: iptables/repos/testing-i686/0503-extension_cppflags.patch (from rev 179928, iptables/trunk/0503-extension_cppflags.patch)
===================================================================
--- testing-i686/0503-extension_cppflags.patch	                        (rev 0)
+++ testing-i686/0503-extension_cppflags.patch	2013-03-12 15:32:17 UTC (rev 179929)
@@ -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@
+ 

Copied: iptables/repos/testing-i686/PKGBUILD (from rev 179928, iptables/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,87 @@
+# $Id$
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Thomas Baechler <thomas at archlinux.org>
+
+pkgname=iptables
+pkgver=1.4.18
+pkgrel=1
+pkgdesc='Linux kernel packet control tool'
+arch=('i686' 'x86_64')
+license=('GPL2')
+url='http://www.netfilter.org/projects/iptables/index.html'
+depends=('glibc' 'bash')
+makedepends=('linux-api-headers' 'chrpath')
+options=('!libtool')
+source=("http://www.netfilter.org/projects/iptables/files/${pkgname}-${pkgver}.tar.bz2"
+        iptables
+        ip6tables
+        empty.rules
+        simple_firewall.rules
+        iptables.conf.d
+        empty-filter.rules
+        empty-mangle.rules
+        empty-nat.rules
+        empty-raw.rules
+        empty-security.rules
+        0503-extension_cppflags.patch
+        iptables.service
+        ip6tables.service
+        iptables-flush)
+backup=(etc/conf.d/iptables)
+sha1sums=('34bf627c8755a61caf3635a998d2a5279f664f9e'
+          '5bb6fa526665cdd728c26f0f282f5a51f220cf88'
+          '2db68906b603e5268736f48c8e251f3a49da1d75'
+          '83b3363878e3660ce23b2ad325b53cbd6c796ecf'
+          'f085a71f467e4d7cb2cf094d9369b0bcc4bab6ec'
+          'cdb830137192bbe002c6d01058656bd053ed0ddd'
+          'd9f9f06b46b4187648e860afa0552335aafe3ce4'
+          'c45b738b5ec4cfb11611b984c21a83b91a2d58f3'
+          '1694d79b3e6e9d9d543f6a6e75fed06066c9a6c6'
+          '7db53bb882f62f6c677cc8559cff83d8bae2ef73'
+          'ebbd1424a1564fd45f455a81c61ce348f0a14c2e'
+          '44626980a52e49f345a0b1e1ca03060f3a35763c'
+          '5f2e76985a751f635a45612565a6e1bc9547398a'
+          'fe6bbe214b3a13bd084f62a8ee9631fd8326c464'
+          'e7abda09c61142121b6695928d3b71ccd8fdf73a')
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  # use system one
+  rm include/linux/types.h
+
+  patch -Np1 -i ${srcdir}/0503-extension_cppflags.patch
+
+ ./configure --prefix=/usr \
+     --libexecdir=/usr/lib/iptables --sysconfdir=/etc \
+     --with-xtlibdir=/usr/lib/iptables \
+     --enable-devel --enable-shared
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  make DESTDIR="${pkgdir}" install
+
+  # Remove RPATH from iptables libraries
+  # http://www.spinics.net/lists/netfilter-devel/msg24969.html
+  chrpath --delete "${pkgdir}"/usr/lib/iptables/*.so
+
+  cd "${srcdir}"
+  install -D -m755 iptables "${pkgdir}"/etc/rc.d/iptables
+  install -D -m755 ip6tables "${pkgdir}"/etc/rc.d/ip6tables
+  install -D -m644 empty.rules "${pkgdir}"/etc/iptables/empty.rules
+  install -D -m644 simple_firewall.rules "${pkgdir}"/etc/iptables/simple_firewall.rules
+  install -D -m644 iptables.conf.d "${pkgdir}"/etc/conf.d/iptables
+
+  mkdir -p "${pkgdir}"/var/lib/{iptables,ip6tables}
+  install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/iptables
+  install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/ip6tables
+
+  # install systemd files
+  install -Dm644 ${srcdir}/iptables.service ${pkgdir}/usr/lib/systemd/system/iptables.service
+  install -Dm644 ${srcdir}/ip6tables.service ${pkgdir}/usr/lib/systemd/system/ip6tables.service
+  install -Dm755 ${srcdir}/iptables-flush ${pkgdir}/usr/lib/systemd/scripts/iptables-flush  
+}
+

Copied: iptables/repos/testing-i686/empty-filter.rules (from rev 179928, iptables/trunk/empty-filter.rules)
===================================================================
--- testing-i686/empty-filter.rules	                        (rev 0)
+++ testing-i686/empty-filter.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,6 @@
+# Empty iptables filter table rule file
+*filter
+:INPUT ACCEPT [0:0]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+COMMIT

Copied: iptables/repos/testing-i686/empty-mangle.rules (from rev 179928, iptables/trunk/empty-mangle.rules)
===================================================================
--- testing-i686/empty-mangle.rules	                        (rev 0)
+++ testing-i686/empty-mangle.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,8 @@
+# Empty iptables mangle table rules file
+*mangle
+:PREROUTING ACCEPT [0:0]
+:INPUT ACCEPT [0:0]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+:POSTROUTING ACCEPT [0:0]
+COMMIT

Copied: iptables/repos/testing-i686/empty-nat.rules (from rev 179928, iptables/trunk/empty-nat.rules)
===================================================================
--- testing-i686/empty-nat.rules	                        (rev 0)
+++ testing-i686/empty-nat.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,7 @@
+# Empty iptables nat table rules file
+*nat
+:PREROUTING ACCEPT [0:0]
+:INPUT ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+:POSTROUTING ACCEPT [0:0]
+COMMIT

Copied: iptables/repos/testing-i686/empty-raw.rules (from rev 179928, iptables/trunk/empty-raw.rules)
===================================================================
--- testing-i686/empty-raw.rules	                        (rev 0)
+++ testing-i686/empty-raw.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,5 @@
+# Empty iptables raw table rules file
+*raw
+:PREROUTING ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+COMMIT

Copied: iptables/repos/testing-i686/empty-security.rules (from rev 179928, iptables/trunk/empty-security.rules)
===================================================================
--- testing-i686/empty-security.rules	                        (rev 0)
+++ testing-i686/empty-security.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,6 @@
+# Empty iptables security table rules file
+*security
+:INPUT ACCEPT [0:0]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+COMMIT

Copied: iptables/repos/testing-i686/empty.rules (from rev 179928, iptables/trunk/empty.rules)
===================================================================
--- testing-i686/empty.rules	                        (rev 0)
+++ testing-i686/empty.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,6 @@
+# Empty iptables rule file
+*filter
+:INPUT ACCEPT [0:0]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+COMMIT

Copied: iptables/repos/testing-i686/ip6tables (from rev 179928, iptables/trunk/ip6tables)
===================================================================
--- testing-i686/ip6tables	                        (rev 0)
+++ testing-i686/ip6tables	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+# source application-specific settings
+[ -f /etc/conf.d/iptables ] && . /etc/conf.d/iptables
+
+# Set defaults if settings are missing
+[ -z "$IP6TABLES_CONF" ] && IP6TABLES_CONF=/etc/iptables/ip6tables.rules
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+	start)
+		if [ ! -f "$IP6TABLES_CONF" ]; then
+			echo "Cannot load ip6tables rules: $IP6TABLES_CONF is missing!" >&2
+			exit 1
+		fi
+		stat_busy "Starting IP6 Tables"
+		if [ "$IPTABLES_FORWARD" = "1" ]; then
+			echo 1 >/proc/sys/net/ipv6/conf/default/forwarding
+			echo 1 >/proc/sys/net/ipv6/conf/all/forwarding
+		fi
+		if ck_daemon ip6tables; then
+			/usr/sbin/ip6tables-restore < $IP6TABLES_CONF
+			if [ $? -gt 0 ]; then
+				stat_fail
+			else
+				add_daemon ip6tables
+				stat_done
+			fi
+		else
+			stat_fail
+		fi
+		;;
+	stop)
+		stat_busy "Stopping IP6 Tables"
+		if ! ck_daemon ip6tables; then
+			fail=0
+			for table in $(cat /proc/net/ip6_tables_names); do
+				ip6tables-restore < /var/lib/iptables/empty-$table.rules
+				[ $? -gt 0 ] && fail=1
+			done
+			if [ $fail -gt 0 ]; then
+				stat_fail
+			else
+				rm_daemon ip6tables
+				stat_done
+			fi
+		else
+			stat_fail
+		fi
+		;;
+	restart)
+		$0 stop
+		$0 start
+		;;
+	save)
+		stat_busy "Saving IP6 Tables"
+		/usr/sbin/ip6tables-save >$IP6TABLES_CONF
+		if [ $? -gt 0 ]; then
+			stat_fail
+		else
+			stat_done
+		fi
+		;;
+	*)
+		echo "usage: $0 {start|stop|restart|save}"
+esac
+exit 0

Copied: iptables/repos/testing-i686/ip6tables.service (from rev 179928, iptables/trunk/ip6tables.service)
===================================================================
--- testing-i686/ip6tables.service	                        (rev 0)
+++ testing-i686/ip6tables.service	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,12 @@
+[Unit]
+Description=IPv6 Packet Filtering Framework
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/ip6tables-restore /etc/iptables/ip6tables.rules
+ExecReload=/usr/sbin/ip6tables-restore /etc/iptables/ip6tables.rules
+ExecStop=/usr/lib/systemd/scripts/iptables-flush 6
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target

Copied: iptables/repos/testing-i686/iptables (from rev 179928, iptables/trunk/iptables)
===================================================================
--- testing-i686/iptables	                        (rev 0)
+++ testing-i686/iptables	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,68 @@
+#!/bin/bash
+
+# source application-specific settings
+[ -f /etc/conf.d/iptables ] && . /etc/conf.d/iptables
+
+# Set defaults if settings are missing
+[ -z "$IPTABLES_CONF" ] && IPTABLES_CONF=/etc/iptables/iptables.rules
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+	start)
+		if [ ! -f "$IPTABLES_CONF" ]; then
+			echo "Cannot load iptables rules: $IPTABLES_CONF is missing!" >&2
+			exit 1
+		fi
+		stat_busy "Starting IP Tables"
+		if [ "$IPTABLES_FORWARD" = "1" ]; then
+			echo 1 >/proc/sys/net/ipv4/ip_forward
+		fi
+		if ck_daemon iptables; then
+			/usr/sbin/iptables-restore < $IPTABLES_CONF
+			if [ $? -gt 0 ]; then
+				stat_fail
+			else
+				add_daemon iptables
+				stat_done
+			fi
+		else
+			stat_fail
+		fi
+		;;
+	stop)
+		stat_busy "Stopping IP Tables"
+		if ! ck_daemon iptables; then
+			fail=0
+			for table in $(cat /proc/net/ip_tables_names); do
+				iptables-restore < /var/lib/iptables/empty-$table.rules
+				[ $? -gt 0 ] && fail=1
+			done
+			if [ $fail -gt 0 ]; then
+				stat_fail
+			else
+				rm_daemon iptables
+				stat_done
+			fi
+		else
+			stat_fail
+		fi
+		;;
+	restart)
+		$0 stop
+		$0 start
+		;;
+	save)
+		stat_busy "Saving IP Tables"
+		/usr/sbin/iptables-save >$IPTABLES_CONF
+		if [ $? -gt 0 ]; then
+			stat_fail
+		else
+			stat_done
+		fi
+		;;
+	*)
+		echo "usage: $0 {start|stop|restart|save}"
+esac
+exit 0

Copied: iptables/repos/testing-i686/iptables-1.4.12-fixresore.patch (from rev 179928, iptables/trunk/iptables-1.4.12-fixresore.patch)
===================================================================
--- testing-i686/iptables-1.4.12-fixresore.patch	                        (rev 0)
+++ testing-i686/iptables-1.4.12-fixresore.patch	2013-03-12 15:32:17 UTC (rev 179929)
@@ -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) {

Copied: iptables/repos/testing-i686/iptables-flush (from rev 179928, iptables/trunk/iptables-flush)
===================================================================
--- testing-i686/iptables-flush	                        (rev 0)
+++ testing-i686/iptables-flush	2013-03-12 15:32:17 UTC (rev 179929)
@@ -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

Copied: iptables/repos/testing-i686/iptables.conf.d (from rev 179928, iptables/trunk/iptables.conf.d)
===================================================================
--- testing-i686/iptables.conf.d	                        (rev 0)
+++ testing-i686/iptables.conf.d	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,12 @@
+# Configuration for iptables rules
+IPTABLES_CONF=/etc/iptables/iptables.rules
+IP6TABLES_CONF=/etc/iptables/ip6tables.rules
+
+# Enable IP forwarding (both IPv4 and IPv6)
+# NOTE: this is not the recommended way to do this, and is supported only for
+# backward compatibility. Instead, use /etc/sysctl.conf and set the following
+# options:
+# * net.ipv4.ip_forward=1
+# * net.ipv6.conf.default.forwarding=1
+# * net.ipv6.conf.all.forwarding=1
+#IPTABLES_FORWARD=0

Copied: iptables/repos/testing-i686/iptables.service (from rev 179928, iptables/trunk/iptables.service)
===================================================================
--- testing-i686/iptables.service	                        (rev 0)
+++ testing-i686/iptables.service	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,12 @@
+[Unit]
+Description=Packet Filtering Framework
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/iptables-restore /etc/iptables/iptables.rules
+ExecReload=/usr/sbin/iptables-restore /etc/iptables/iptables.rules
+ExecStop=/usr/lib/systemd/scripts/iptables-flush
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target

Copied: iptables/repos/testing-i686/simple_firewall.rules (from rev 179928, iptables/trunk/simple_firewall.rules)
===================================================================
--- testing-i686/simple_firewall.rules	                        (rev 0)
+++ testing-i686/simple_firewall.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,11 @@
+*filter
+:INPUT DROP [0:0]
+:FORWARD DROP [0:0]
+:OUTPUT ACCEPT [0:0]
+-A INPUT -p icmp -j ACCEPT 
+-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT 
+-A INPUT -i lo -j ACCEPT 
+-A INPUT -p tcp -j REJECT --reject-with tcp-reset 
+-A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable 
+-A INPUT -j REJECT --reject-with icmp-proto-unreachable 
+COMMIT

Copied: iptables/repos/testing-x86_64/0503-extension_cppflags.patch (from rev 179928, iptables/trunk/0503-extension_cppflags.patch)
===================================================================
--- testing-x86_64/0503-extension_cppflags.patch	                        (rev 0)
+++ testing-x86_64/0503-extension_cppflags.patch	2013-03-12 15:32:17 UTC (rev 179929)
@@ -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@
+ 

Copied: iptables/repos/testing-x86_64/PKGBUILD (from rev 179928, iptables/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,87 @@
+# $Id$
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Thomas Baechler <thomas at archlinux.org>
+
+pkgname=iptables
+pkgver=1.4.18
+pkgrel=1
+pkgdesc='Linux kernel packet control tool'
+arch=('i686' 'x86_64')
+license=('GPL2')
+url='http://www.netfilter.org/projects/iptables/index.html'
+depends=('glibc' 'bash')
+makedepends=('linux-api-headers' 'chrpath')
+options=('!libtool')
+source=("http://www.netfilter.org/projects/iptables/files/${pkgname}-${pkgver}.tar.bz2"
+        iptables
+        ip6tables
+        empty.rules
+        simple_firewall.rules
+        iptables.conf.d
+        empty-filter.rules
+        empty-mangle.rules
+        empty-nat.rules
+        empty-raw.rules
+        empty-security.rules
+        0503-extension_cppflags.patch
+        iptables.service
+        ip6tables.service
+        iptables-flush)
+backup=(etc/conf.d/iptables)
+sha1sums=('34bf627c8755a61caf3635a998d2a5279f664f9e'
+          '5bb6fa526665cdd728c26f0f282f5a51f220cf88'
+          '2db68906b603e5268736f48c8e251f3a49da1d75'
+          '83b3363878e3660ce23b2ad325b53cbd6c796ecf'
+          'f085a71f467e4d7cb2cf094d9369b0bcc4bab6ec'
+          'cdb830137192bbe002c6d01058656bd053ed0ddd'
+          'd9f9f06b46b4187648e860afa0552335aafe3ce4'
+          'c45b738b5ec4cfb11611b984c21a83b91a2d58f3'
+          '1694d79b3e6e9d9d543f6a6e75fed06066c9a6c6'
+          '7db53bb882f62f6c677cc8559cff83d8bae2ef73'
+          'ebbd1424a1564fd45f455a81c61ce348f0a14c2e'
+          '44626980a52e49f345a0b1e1ca03060f3a35763c'
+          '5f2e76985a751f635a45612565a6e1bc9547398a'
+          'fe6bbe214b3a13bd084f62a8ee9631fd8326c464'
+          'e7abda09c61142121b6695928d3b71ccd8fdf73a')
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  # use system one
+  rm include/linux/types.h
+
+  patch -Np1 -i ${srcdir}/0503-extension_cppflags.patch
+
+ ./configure --prefix=/usr \
+     --libexecdir=/usr/lib/iptables --sysconfdir=/etc \
+     --with-xtlibdir=/usr/lib/iptables \
+     --enable-devel --enable-shared
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  make DESTDIR="${pkgdir}" install
+
+  # Remove RPATH from iptables libraries
+  # http://www.spinics.net/lists/netfilter-devel/msg24969.html
+  chrpath --delete "${pkgdir}"/usr/lib/iptables/*.so
+
+  cd "${srcdir}"
+  install -D -m755 iptables "${pkgdir}"/etc/rc.d/iptables
+  install -D -m755 ip6tables "${pkgdir}"/etc/rc.d/ip6tables
+  install -D -m644 empty.rules "${pkgdir}"/etc/iptables/empty.rules
+  install -D -m644 simple_firewall.rules "${pkgdir}"/etc/iptables/simple_firewall.rules
+  install -D -m644 iptables.conf.d "${pkgdir}"/etc/conf.d/iptables
+
+  mkdir -p "${pkgdir}"/var/lib/{iptables,ip6tables}
+  install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/iptables
+  install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/ip6tables
+
+  # install systemd files
+  install -Dm644 ${srcdir}/iptables.service ${pkgdir}/usr/lib/systemd/system/iptables.service
+  install -Dm644 ${srcdir}/ip6tables.service ${pkgdir}/usr/lib/systemd/system/ip6tables.service
+  install -Dm755 ${srcdir}/iptables-flush ${pkgdir}/usr/lib/systemd/scripts/iptables-flush  
+}
+

Copied: iptables/repos/testing-x86_64/empty-filter.rules (from rev 179928, iptables/trunk/empty-filter.rules)
===================================================================
--- testing-x86_64/empty-filter.rules	                        (rev 0)
+++ testing-x86_64/empty-filter.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,6 @@
+# Empty iptables filter table rule file
+*filter
+:INPUT ACCEPT [0:0]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+COMMIT

Copied: iptables/repos/testing-x86_64/empty-mangle.rules (from rev 179928, iptables/trunk/empty-mangle.rules)
===================================================================
--- testing-x86_64/empty-mangle.rules	                        (rev 0)
+++ testing-x86_64/empty-mangle.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,8 @@
+# Empty iptables mangle table rules file
+*mangle
+:PREROUTING ACCEPT [0:0]
+:INPUT ACCEPT [0:0]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+:POSTROUTING ACCEPT [0:0]
+COMMIT

Copied: iptables/repos/testing-x86_64/empty-nat.rules (from rev 179928, iptables/trunk/empty-nat.rules)
===================================================================
--- testing-x86_64/empty-nat.rules	                        (rev 0)
+++ testing-x86_64/empty-nat.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,7 @@
+# Empty iptables nat table rules file
+*nat
+:PREROUTING ACCEPT [0:0]
+:INPUT ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+:POSTROUTING ACCEPT [0:0]
+COMMIT

Copied: iptables/repos/testing-x86_64/empty-raw.rules (from rev 179928, iptables/trunk/empty-raw.rules)
===================================================================
--- testing-x86_64/empty-raw.rules	                        (rev 0)
+++ testing-x86_64/empty-raw.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,5 @@
+# Empty iptables raw table rules file
+*raw
+:PREROUTING ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+COMMIT

Copied: iptables/repos/testing-x86_64/empty-security.rules (from rev 179928, iptables/trunk/empty-security.rules)
===================================================================
--- testing-x86_64/empty-security.rules	                        (rev 0)
+++ testing-x86_64/empty-security.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,6 @@
+# Empty iptables security table rules file
+*security
+:INPUT ACCEPT [0:0]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+COMMIT

Copied: iptables/repos/testing-x86_64/empty.rules (from rev 179928, iptables/trunk/empty.rules)
===================================================================
--- testing-x86_64/empty.rules	                        (rev 0)
+++ testing-x86_64/empty.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,6 @@
+# Empty iptables rule file
+*filter
+:INPUT ACCEPT [0:0]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+COMMIT

Copied: iptables/repos/testing-x86_64/ip6tables (from rev 179928, iptables/trunk/ip6tables)
===================================================================
--- testing-x86_64/ip6tables	                        (rev 0)
+++ testing-x86_64/ip6tables	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+# source application-specific settings
+[ -f /etc/conf.d/iptables ] && . /etc/conf.d/iptables
+
+# Set defaults if settings are missing
+[ -z "$IP6TABLES_CONF" ] && IP6TABLES_CONF=/etc/iptables/ip6tables.rules
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+	start)
+		if [ ! -f "$IP6TABLES_CONF" ]; then
+			echo "Cannot load ip6tables rules: $IP6TABLES_CONF is missing!" >&2
+			exit 1
+		fi
+		stat_busy "Starting IP6 Tables"
+		if [ "$IPTABLES_FORWARD" = "1" ]; then
+			echo 1 >/proc/sys/net/ipv6/conf/default/forwarding
+			echo 1 >/proc/sys/net/ipv6/conf/all/forwarding
+		fi
+		if ck_daemon ip6tables; then
+			/usr/sbin/ip6tables-restore < $IP6TABLES_CONF
+			if [ $? -gt 0 ]; then
+				stat_fail
+			else
+				add_daemon ip6tables
+				stat_done
+			fi
+		else
+			stat_fail
+		fi
+		;;
+	stop)
+		stat_busy "Stopping IP6 Tables"
+		if ! ck_daemon ip6tables; then
+			fail=0
+			for table in $(cat /proc/net/ip6_tables_names); do
+				ip6tables-restore < /var/lib/iptables/empty-$table.rules
+				[ $? -gt 0 ] && fail=1
+			done
+			if [ $fail -gt 0 ]; then
+				stat_fail
+			else
+				rm_daemon ip6tables
+				stat_done
+			fi
+		else
+			stat_fail
+		fi
+		;;
+	restart)
+		$0 stop
+		$0 start
+		;;
+	save)
+		stat_busy "Saving IP6 Tables"
+		/usr/sbin/ip6tables-save >$IP6TABLES_CONF
+		if [ $? -gt 0 ]; then
+			stat_fail
+		else
+			stat_done
+		fi
+		;;
+	*)
+		echo "usage: $0 {start|stop|restart|save}"
+esac
+exit 0

Copied: iptables/repos/testing-x86_64/ip6tables.service (from rev 179928, iptables/trunk/ip6tables.service)
===================================================================
--- testing-x86_64/ip6tables.service	                        (rev 0)
+++ testing-x86_64/ip6tables.service	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,12 @@
+[Unit]
+Description=IPv6 Packet Filtering Framework
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/ip6tables-restore /etc/iptables/ip6tables.rules
+ExecReload=/usr/sbin/ip6tables-restore /etc/iptables/ip6tables.rules
+ExecStop=/usr/lib/systemd/scripts/iptables-flush 6
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target

Copied: iptables/repos/testing-x86_64/iptables (from rev 179928, iptables/trunk/iptables)
===================================================================
--- testing-x86_64/iptables	                        (rev 0)
+++ testing-x86_64/iptables	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,68 @@
+#!/bin/bash
+
+# source application-specific settings
+[ -f /etc/conf.d/iptables ] && . /etc/conf.d/iptables
+
+# Set defaults if settings are missing
+[ -z "$IPTABLES_CONF" ] && IPTABLES_CONF=/etc/iptables/iptables.rules
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+	start)
+		if [ ! -f "$IPTABLES_CONF" ]; then
+			echo "Cannot load iptables rules: $IPTABLES_CONF is missing!" >&2
+			exit 1
+		fi
+		stat_busy "Starting IP Tables"
+		if [ "$IPTABLES_FORWARD" = "1" ]; then
+			echo 1 >/proc/sys/net/ipv4/ip_forward
+		fi
+		if ck_daemon iptables; then
+			/usr/sbin/iptables-restore < $IPTABLES_CONF
+			if [ $? -gt 0 ]; then
+				stat_fail
+			else
+				add_daemon iptables
+				stat_done
+			fi
+		else
+			stat_fail
+		fi
+		;;
+	stop)
+		stat_busy "Stopping IP Tables"
+		if ! ck_daemon iptables; then
+			fail=0
+			for table in $(cat /proc/net/ip_tables_names); do
+				iptables-restore < /var/lib/iptables/empty-$table.rules
+				[ $? -gt 0 ] && fail=1
+			done
+			if [ $fail -gt 0 ]; then
+				stat_fail
+			else
+				rm_daemon iptables
+				stat_done
+			fi
+		else
+			stat_fail
+		fi
+		;;
+	restart)
+		$0 stop
+		$0 start
+		;;
+	save)
+		stat_busy "Saving IP Tables"
+		/usr/sbin/iptables-save >$IPTABLES_CONF
+		if [ $? -gt 0 ]; then
+			stat_fail
+		else
+			stat_done
+		fi
+		;;
+	*)
+		echo "usage: $0 {start|stop|restart|save}"
+esac
+exit 0

Copied: iptables/repos/testing-x86_64/iptables-1.4.12-fixresore.patch (from rev 179928, iptables/trunk/iptables-1.4.12-fixresore.patch)
===================================================================
--- testing-x86_64/iptables-1.4.12-fixresore.patch	                        (rev 0)
+++ testing-x86_64/iptables-1.4.12-fixresore.patch	2013-03-12 15:32:17 UTC (rev 179929)
@@ -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) {

Copied: iptables/repos/testing-x86_64/iptables-flush (from rev 179928, iptables/trunk/iptables-flush)
===================================================================
--- testing-x86_64/iptables-flush	                        (rev 0)
+++ testing-x86_64/iptables-flush	2013-03-12 15:32:17 UTC (rev 179929)
@@ -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

Copied: iptables/repos/testing-x86_64/iptables.conf.d (from rev 179928, iptables/trunk/iptables.conf.d)
===================================================================
--- testing-x86_64/iptables.conf.d	                        (rev 0)
+++ testing-x86_64/iptables.conf.d	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,12 @@
+# Configuration for iptables rules
+IPTABLES_CONF=/etc/iptables/iptables.rules
+IP6TABLES_CONF=/etc/iptables/ip6tables.rules
+
+# Enable IP forwarding (both IPv4 and IPv6)
+# NOTE: this is not the recommended way to do this, and is supported only for
+# backward compatibility. Instead, use /etc/sysctl.conf and set the following
+# options:
+# * net.ipv4.ip_forward=1
+# * net.ipv6.conf.default.forwarding=1
+# * net.ipv6.conf.all.forwarding=1
+#IPTABLES_FORWARD=0

Copied: iptables/repos/testing-x86_64/iptables.service (from rev 179928, iptables/trunk/iptables.service)
===================================================================
--- testing-x86_64/iptables.service	                        (rev 0)
+++ testing-x86_64/iptables.service	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,12 @@
+[Unit]
+Description=Packet Filtering Framework
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/iptables-restore /etc/iptables/iptables.rules
+ExecReload=/usr/sbin/iptables-restore /etc/iptables/iptables.rules
+ExecStop=/usr/lib/systemd/scripts/iptables-flush
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target

Copied: iptables/repos/testing-x86_64/simple_firewall.rules (from rev 179928, iptables/trunk/simple_firewall.rules)
===================================================================
--- testing-x86_64/simple_firewall.rules	                        (rev 0)
+++ testing-x86_64/simple_firewall.rules	2013-03-12 15:32:17 UTC (rev 179929)
@@ -0,0 +1,11 @@
+*filter
+:INPUT DROP [0:0]
+:FORWARD DROP [0:0]
+:OUTPUT ACCEPT [0:0]
+-A INPUT -p icmp -j ACCEPT 
+-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT 
+-A INPUT -i lo -j ACCEPT 
+-A INPUT -p tcp -j REJECT --reject-with tcp-reset 
+-A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable 
+-A INPUT -j REJECT --reject-with icmp-proto-unreachable 
+COMMIT




More information about the arch-commits mailing list