From: Eric Leblond <eric@inl.fr>
To: Christoph Paasch <christoph.paasch@student.uclouvain.be>
Cc: netfilter-devel@vger.kernel.org, yasuyuki.kozakai@toshiba.co.jp,
kaber@trash.net
Subject: Re: [PATCH] netfilter: don't track ICMPv6 negotiation message.
Date: Sun, 08 Feb 2009 18:35:38 +0100 [thread overview]
Message-ID: <498F17EA.1030907@inl.fr> (raw)
In-Reply-To: <200902061130.29873.christoph.paasch@student.uclouvain.be>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Christoph Paasch a écrit :
> Hi,
>
> I have two questions regarding this patch.
>
> On Tue January 27 2009, Eric Leblond wrote:
>> + type = icmp6h->icmp6_type - 130;
>> + if (type >= 0 && type < sizeof(noct_valid_new)
>> + && noct_valid_new[type]) {
>> + skb->nfct = &nf_conntrack_untracked.ct_general;
>> + skb->nfctinfo = IP_CT_NEW;
>> + nf_conntrack_get(skb->nfct);
>> + return NF_ACCEPT;
>> + }
>
> Why do you set skb->nfctinfo = IP_CT_NEW?
> Because in xt_state.c, at state_mt(...) :
> if it is in front of an untracked packet (using nf_ct_is_untracked(skb)) it
> automatically sets the statebit to UNTRACKED and so the IP_CT_NEW isn't used.
Not much to say on that point. I wanted to be homogeneous with what is
done in xt_NOTRACK.c.
> Why do you return NF_ACCEPT and not -NF_ACCEPT?
> By returning a positiv value, the packet will continue it's way through the
> connection tracker.
If I understand well, icmpv6_error will be called in nf_conntrack_core.c
as l4proto->error :
if (l4proto->error != NULL) {
ret = l4proto->error(net, skb, dataoff, &ctinfo, pf, hooknum);
if (ret <= 0) {
NF_CT_STAT_INC_ATOMIC(net, error);
NF_CT_STAT_INC_ATOMIC(net, invalid);
return -ret;
}
}
It will thus increment error counters if return is -NF_ACCEPT. As the
packets we deal with are not error I don't think it is correct to return
- -NF_ACCEPT.
But I agree with the fact, that returning NF_ACCEPT leads to some
useless work inside the kernel.
BR,
- --
Eric Leblond <eric@inl.fr>
INL: http://www.inl.fr/
NuFW: http://www.nufw.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJjxfknxA7CdMWjzIRAn0aAKCQCN4JpW8eae4isbeSA/77Fl0vagCfdfhJ
7n/HGloTFIT9V+mAKnG4oPs=
=65y5
-----END PGP SIGNATURE-----
--
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:[~2009-02-08 17:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200901271007.n0RA78k6023294@toshiba.co.jp>
2009-01-27 10:55 ` [PATCH] netfilter: don't track ICMPv6 negotiation message Eric Leblond
2009-01-27 14:57 ` Patrick McHardy
2009-02-06 10:30 ` Christoph Paasch
2009-02-08 17:35 ` Eric Leblond [this message]
2009-02-09 17:39 ` Christoph Paasch
2009-01-23 11:10 [PATCH 0/2] IPv6 conntrack support for neighbour discovery Yasuyuki KOZAKAI
2009-01-24 10:32 ` [PATCH] netfilter: don't track ICMPv6 negotiation message Eric Leblond
2009-01-27 10:07 ` Yasuyuki KOZAKAI
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=498F17EA.1030907@inl.fr \
--to=eric@inl.fr \
--cc=christoph.paasch@student.uclouvain.be \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=yasuyuki.kozakai@toshiba.co.jp \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.