* [PATCH v2 iptables] added missing icmpv6 codes in REJECT
@ 2015-08-21 9:33 Andreas Herz
2015-09-29 18:35 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Herz @ 2015-08-21 9:33 UTC (permalink / raw)
To: netfilter-devel; +Cc: Andreas Herz
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>
---
extensions/libip6t_REJECT.c | 6 +++++-
extensions/libip6t_REJECT.t | 2 ++
include/linux/netfilter_ipv6/ip6t_REJECT.h | 4 +++-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/extensions/libip6t_REJECT.c b/extensions/libip6t_REJECT.c
index 8085321..d62f431 100644
--- a/extensions/libip6t_REJECT.c
+++ b/extensions/libip6t_REJECT.c
@@ -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
diff --git a/extensions/libip6t_REJECT.t b/extensions/libip6t_REJECT.t
index 5a38942..d2b337d 100644
--- a/extensions/libip6t_REJECT.t
+++ b/extensions/libip6t_REJECT.t
@@ -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
diff --git a/include/linux/netfilter_ipv6/ip6t_REJECT.h b/include/linux/netfilter_ipv6/ip6t_REJECT.h
index 205ed62..cd2e940 100644
--- a/include/linux/netfilter_ipv6/ip6t_REJECT.h
+++ b/include/linux/netfilter_ipv6/ip6t_REJECT.h
@@ -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 {
--
2.4.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 iptables] added missing icmpv6 codes in REJECT
2015-08-21 9:33 [PATCH v2 iptables] added missing icmpv6 codes in REJECT Andreas Herz
@ 2015-09-29 18:35 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2015-09-29 18:35 UTC (permalink / raw)
To: Andreas Herz; +Cc: netfilter-devel
On Fri, Aug 21, 2015 at 11:33:05AM +0200, Andreas Herz wrote:
> 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.
Applied this to iptables now that we've got a -rc kernel with this
support so people can test it, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-29 18:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-21 9:33 [PATCH v2 iptables] added missing icmpv6 codes in REJECT Andreas Herz
2015-09-29 18:35 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).