From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "Miguel Alejandro González" <maggonzz@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: conntrack tuple
Date: Sat, 15 Sep 2012 23:14:50 +0200 [thread overview]
Message-ID: <20120915211450.GA11216@1984> (raw)
In-Reply-To: <CA+Z0r8Mg3X8LQF0Y-kODT+SGgYuOm7FwwWWZoz5R+XP=vFLRLQ@mail.gmail.com>
Hi,
On Fri, Sep 14, 2012 at 09:57:36AM -0500, Miguel Alejandro González wrote:
> Hello
>
> I have some questions about how conntrack tuple handles ICMP error messages...
>
> When a ICMP error packet arrives containing an embedded UDP or TCP
> packet, assuming there was already a UDP or TCP connection being
> tracked by conntrack, what are the IP addresses of the tuple, the ones
> from the ICMP error message or the ones from the embedded packet?
It uses inner headers of the ICMP error message, ie. "the ones from
the embedded packet".
See net/ipv4/netfilter/nf_conntrack_proto_icmp.c
> Also does the tuple saves port information in this case as well as icmp
> type and code?
Conntrack does not save any ICMP error information.
> How does conntrack know that ICMP error message is related to an
> existing connection?
The conntrack code looks up for some existing entry by using the
information in the inner headers of the ICMP error message.
If no entry is found, the packet is considered invalid, and you can
drop it with iptables ... -m state --state INVALID
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-09-15 21:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 14:57 conntrack tuple Miguel Alejandro González
2012-09-15 21:14 ` Pablo Neira Ayuso [this message]
2012-09-16 0:08 ` Miguel Alejandro González
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120915211450.GA11216@1984 \
--to=pablo@netfilter.org \
--cc=maggonzz@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).