mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-12 10:06:39 +07:00
netfilter: ip6t_REJECT: added missing icmpv6 codes
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. Codes 5 and 6 are more informative subsets of code 1. Signed-off-by: Andreas Herz <andi@geekosphere.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
116984a316
commit
1afe839e6b
@ -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 {
|
||||
|
@ -63,6 +63,12 @@ reject_tg6(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
case IP6T_TCP_RESET:
|
||||
nf_send_reset6(net, skb, par->hooknum);
|
||||
break;
|
||||
case IP6T_ICMP6_POLICY_FAIL:
|
||||
nf_send_unreach6(net, skb, ICMPV6_POLICY_FAIL, par->hooknum);
|
||||
break;
|
||||
case IP6T_ICMP6_REJECT_ROUTE:
|
||||
nf_send_unreach6(net, skb, ICMPV6_REJECT_ROUTE, par->hooknum);
|
||||
break;
|
||||
}
|
||||
|
||||
return NF_DROP;
|
||||
|
Loading…
Reference in New Issue
Block a user