From 9e65113f1bd9bf4eee3d69fa030e36d94700c7e1 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 5 May 2013 23:01:21 +0200 Subject: [PATCH] iptables: Automatically convert icmp to icmpv6 for IPv6. --- functions.iptables | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/functions.iptables b/functions.iptables index e2e2b2ea..fe519785 100644 --- a/functions.iptables +++ b/functions.iptables @@ -45,6 +45,18 @@ function iptables() { assert isoneof table ${IPTABLES_TABLES} ;; + + # Automatically convert ICMP to ICMPv6 for IPv6 + --protocol|-p) + local proto="${2}" + + if [ "${protocol}" = "ipv6" -a "${proto}" = "icmp" ]; then + proto="icmpv6" + fi + + list_append args "${1} ${proto}" + shift 2 + ;; *) list_append args "${1}" -- 2.47.3