]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
added missing icmpv6 codes in REJECT
authorAndreas Herz <andi@geekosphere.org>
Fri, 21 Aug 2015 09:33:05 +0000 (11:33 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 29 Sep 2015 18:34:50 +0000 (20:34 +0200)
RFC 4443 added two new codes values for ICMPv6 type 1:

 5 - Source address failed ingress/egress policy
 6 - Reject route to destination

And RFC 7084 states in L-14 that IPv6 Router MUST send ICMPv6 Destination
Unreachable with code 5 for packets forwarded to it that use an address
from a prefix that has been invalidated.

Signed-off-by: Andreas Herz <andi@geekosphere.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libip6t_REJECT.c
extensions/libip6t_REJECT.t
include/linux/netfilter_ipv6/ip6t_REJECT.h

index 8085321a6d654e2b331db2b90ef060348d8d7717..d62f4315469b6989ee553fa37d06d999c42fe394 100644 (file)
@@ -35,7 +35,11 @@ static const struct reject_names reject_table[] = {
        {"icmp6-port-unreachable", "port-unreach",
                IP6T_ICMP6_PORT_UNREACH, "ICMPv6 port unreachable"},
        {"tcp-reset", "tcp-reset",
-               IP6T_TCP_RESET, "TCP RST packet"}
+               IP6T_TCP_RESET, "TCP RST packet"},
+       {"icmp6-policy-fail", "policy-fail",
+               IP6T_ICMP6_POLICY_FAIL, "ICMPv6 policy fail"},
+       {"icmp6-reject-route", "reject-route",
+               IP6T_ICMP6_REJECT_ROUTE, "ICMPv6 reject route"}
 };
 
 static void
index 5a38942034394db1993403dfa7dcfe74aec8ba80..d2b337d7ebdeb87ee8f879967e473a27d0a7b165 100644 (file)
@@ -5,5 +5,7 @@
 -j REJECT --reject-with icmp6-adm-prohibited;=;OK
 -j REJECT --reject-with icmp6-addr-unreachable;=;OK
 -j REJECT --reject-with icmp6-port-unreachable;=;OK
+-j REJECT --reject-with icmp6-policy-fail;=;OK
+-j REJECT --reject-with icmp6-reject-route;=;OK
 -p tcp -j REJECT --reject-with tcp-reset;=;OK
 -j REJECT --reject-with tcp-reset;;FAIL
index 205ed62e4605dbf3d1ce080ec721b919829af50f..cd2e940c8bf531adb6d88f9965f08487d50f7c2f 100644 (file)
@@ -10,7 +10,9 @@ enum ip6t_reject_with {
        IP6T_ICMP6_ADDR_UNREACH,
        IP6T_ICMP6_PORT_UNREACH,
        IP6T_ICMP6_ECHOREPLY,
-       IP6T_TCP_RESET
+       IP6T_TCP_RESET,
+       IP6T_ICMP6_POLICY_FAIL,
+       IP6T_ICMP6_REJECT_ROUTE
 };
 
 struct ip6t_reject_info {