aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2016-01-24 18:01:40 +0000
committerJo-Philipp Wich <jow@openwrt.org>2016-01-24 18:01:40 +0000
commiteda1ea9eaab82c4037b6f30cb0eafdcf038fcd47 (patch)
tree8b45ff1fd5d33a6ee9a6d414a64920813c2b69da /package/network/utils
parent1c7c99701961166cb9c7387ccaeca93705deb5e6 (diff)
downloadupstream-eda1ea9eaab82c4037b6f30cb0eafdcf038fcd47.tar.gz
upstream-eda1ea9eaab82c4037b6f30cb0eafdcf038fcd47.tar.bz2
upstream-eda1ea9eaab82c4037b6f30cb0eafdcf038fcd47.zip
iptables: improve iptables listing output of xt_id match
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 48478
Diffstat (limited to 'package/network/utils')
-rw-r--r--package/network/utils/iptables/Makefile4
-rw-r--r--package/network/utils/iptables/patches/500-add-xt_id-match.patch14
2 files changed, 14 insertions, 4 deletions
diff --git a/package/network/utils/iptables/Makefile b/package/network/utils/iptables/Makefile
index e5bca40c7e..1c1a6842ba 100644
--- a/package/network/utils/iptables/Makefile
+++ b/package/network/utils/iptables/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2006-2013 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=iptables
PKG_VERSION:=1.4.21
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.netfilter.org/projects/iptables/files \
diff --git a/package/network/utils/iptables/patches/500-add-xt_id-match.patch b/package/network/utils/iptables/patches/500-add-xt_id-match.patch
index 94762f0ab7..0964f0175f 100644
--- a/package/network/utils/iptables/patches/500-add-xt_id-match.patch
+++ b/package/network/utils/iptables/patches/500-add-xt_id-match.patch
@@ -1,6 +1,6 @@
--- /dev/null
+++ b/extensions/libxt_id.c
-@@ -0,0 +1,45 @@
+@@ -0,0 +1,55 @@
+/* Shared library add-on to iptables to add id match support. */
+
+#include <stdio.h>
@@ -22,13 +22,22 @@
+ XTOPT_TABLEEND,
+};
+
++static void
++id_print(const void *ip, const struct xt_entry_match *match, int numeric)
++{
++ struct xt_id_info *idinfo = (void *)match->data;
++
++ printf(" ID:%08lx", idinfo->id);
++}
++
++
+/* Saves the union ipt_matchinfo in parsable form to stdout. */
+static void
+id_save(const void *ip, const struct xt_entry_match *match)
+{
+ struct xt_id_info *idinfo = (void *)match->data;
+
-+ printf(" --id %lu", idinfo->id);
++ printf(" --id 0x%lx", idinfo->id);
+}
+
+static struct xtables_match id_match = {
@@ -37,6 +46,7 @@
+ .version = XTABLES_VERSION,
+ .size = XT_ALIGN(sizeof(struct xt_id_info)),
+ .userspacesize = XT_ALIGN(sizeof(struct xt_id_info)),
++ .print = id_print,
+ .save = id_save,
+ .x6_parse = xtables_option_parse,
+ .x6_options = id_opts,