Skip to contentSkip to conversation

icmp_error_message return?

DISCUSSION Oleg A. Arkhangelsky 3 participants 5 messages Nov 1, 2010 – Nov 5, 2010 netfilter

lore
Share & tools
lore
#0 lore raw

Hello,

Maybe I'm wrong, but the last line of icmp_error_message() from net/ipv4/netfilter/nf_conntrack_proto_icmp.c seems illogical to me. Should it be return NF_ACCEPT, instead of -NF_ACCEPT?

--
wbr, Oleg

#1 lore raw
Quoted 5 lines · Oleg A. Arkhangelsky

Hello,

Maybe I'm wrong, but the last line of icmp_error_message() from net/ipv4/netfilter/nf_conntrack_proto_icmp.c seems illogical to me. Should it be return NF_ACCEPT, instead of -NF_ACCEPT?

(Same with icmpv6.c)

Hmm! Maybe that explains why the ICMPv6 packets from my HE tunnel are all -m conntrack --ctstate INVALID?

(Ref.: http://www.spinics.net/lists/netfilter-devel/msg13247.html )

#2 lore raw

01.11.2010, 22:42, "Jan Engelhardt" <[email protected]>:

Quoted 12 lines · Oleg A. Arkhangelsky
Quoted 6 lines

Hello,

Maybe I'm wrong, but the last line of icmp_error_message() from net/ipv4/netfilter/nf_conntrack_proto_icmp.c seems illogical to me. Should it be return NF_ACCEPT, instead of -NF_ACCEPT?

(Same with icmpv6.c)

Hmm! Maybe that explains why the ICMPv6 packets from my HE tunnel are all -m conntrack --ctstate INVALID?

Very likely. I'm using IPv4 NAT and see ICMP unreachables left my "outside" interface not translated (with RFC1918 address in src). Apparently this packets have INVALID state due to invalid return. I'll check it later.

Signature · 1 line
wbr, Oleg.
#3 lore raw
In reply to Jan Engelhardt

Hello,

From: Jan Engelhardt <[email protected]>
Date: Mon, 1 Nov 2010 20:42:55 +0100 (CET)

Quoted 7 lines · Oleg A. Arkhangelsky
Quoted 6 lines

Hello,

Maybe I'm wrong, but the last line of icmp_error_message() from net/ipv4/netfilter/nf_conntrack_proto_icmp.c seems illogical to me. Should it be return NF_ACCEPT, instead of -NF_ACCEPT?

-NF_ACCEPT should be returned. ICMP error is the special packet and icmp_error_message() assigns IP_CT_RELATED to ctinfo itself. nf_conntrack_in() is unnecessary to resolve ctinfo as normal packets, so icmp_error_message() returns -NF_ACCEPT.

Quoted 6 lines

(Same with icmpv6.c)

Hmm! Maybe that explains why the ICMPv6 packets from my HE tunnel are all -m conntrack --ctstate INVALID?

(Ref.: http://www.spinics.net/lists/netfilter-devel/msg13247.html )

I think this is another issue. Maybe fragmentation is related to it ?

-- Yasuyuki Kozakai

#4 lore raw

Hello,

04.11.2010, 04:34, "Yasuyuki KOZAKAI" <[email protected]>:

Quoted 9 lines
Quoted 3 lines
Quoted 3 lines

Maybe I'm wrong, but the last line of icmp_error_message() from net/ipv4/netfilter/nf_conntrack_proto_icmp.c seems illogical to me. Should it be return NF_ACCEPT, instead of -NF_ACCEPT?

-NF_ACCEPT should be returned. ICMP error is the special packet and icmp_error_message() assigns IP_CT_RELATED to ctinfo itself. nf_conntrack_in() is unnecessary to resolve ctinfo as normal packets, so icmp_error_message() returns -NF_ACCEPT.

Yes, you're right. Overlooked this. Thanks for clarification!

Signature · 1 line
wbr, Oleg.