Skip to contentSkip to conversation

added missing icmpv6 codes in REJECT

PATCH Applied Andreas Herz 2 participants 2 messages Aug 21, 2015 – Aug 26, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 added missing icmpv6 codes 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.

---
 include/uapi/linux/netfilter_ipv6/ip6t_REJECT.h | 4 +++-
 net/ipv6/netfilter/ip6t_REJECT.c                | 6 ++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
include/uapi/linux/netfilter_ipv6/ip6t_REJECT.h +3 -1
index 205ed62..cd2e940 100644
@@ -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 {
net/ipv6/netfilter/ip6t_REJECT.c +6 -0
index 567367a..0ed841a 100644
@@ -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;
Signature · 1 line
2.4.6
maintainer Applied
#1 lore raw
Quoted 8 lines · 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.

Applied, thanks. This is using the following patch subject in mainstream:

netfilter: ip6t_REJECT: added missing icmpv6 codes

please, use

SYBSYS: COMPONENT: short description

next time when submitting, that helps me to reduce janotoring stuff, but no problem this time.