add missing icmpv6 codes (rfc4443) in REJECT
PATCH 1/1 add missing icmpv6 codes (rfc4443) in REJECT
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 <[email protected]>
--- extensions/libip6t_REJECT.c | 4 ++++ extensions/libip6t_REJECT.t | 2 ++ include/linux/netfilter_ipv6/ip6t_REJECT.h | 2 ++ 3 files changed, 8 insertions(+)
extensions/libip6t_REJECT.c +4 -0
@@ -34,6 +34,10 @@ static const struct reject_names reject_table[] = { IP6T_ICMP6_ADDR_UNREACH, "ICMPv6 address unreachable"}, {"icmp6-port-unreachable" ,"port-unreach" , IP6T_ICMP6_PORT_UNREACH, "ICMPv6 port unreachable"}, + {"icmp6-policy-fail", "policy-fail", + IP6T_ICMP6_POLICY_FAIL, "ICMPv6 policy fail"}, + {"icmp6-reject-route", "reject-route", + IP6T_ICMP6_REJECT_ROUTE, "ICMPv6 reject route"}, {"tcp-reset", "tcp-reset", IP6T_TCP_RESET, "TCP RST packet"} };
extensions/libip6t_REJECT.t +2 -0
@@ -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
include/linux/netfilter_ipv6/ip6t_REJECT.h +2 -0
@@ -9,6 +9,8 @@ enum ip6t_reject_with {IP6T_ICMP6_NOT_NEIGHBOUR ,IP6T_ICMP6_ADDR_UNREACH ,IP6T_ICMP6_PORT_UNREACH , +IP6T_ICMP6_POLICY_FAIL , +IP6T_ICMP6_REJECT_ROUTE ,IP6T_ICMP6_ECHOREPLY , IP6T_TCP_RESET };
Signature · 1 line
2.4.6