From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>,
netfilter-devel@vger.kernel.org, steffen.klassert@secunet.com
Subject: Re: [PATCH nf-next] netfilter: nf_defrag_ipv4: Add sysctl to disable per interface
Date: Wed, 08 Nov 2017 13:46:03 -0700 [thread overview]
Message-ID: <b0a138969da40368de9a117a1045c5c5@codeaurora.org> (raw)
In-Reply-To: <20171108043451.GC1530@salvia>
> We can probably skip defrag if explicit notrack is requested via rule.
Hi Pablo
Thanks for the suggestion. I tried this and it appears that defrag
occurs before NOTRACK is hit in raw table in PREROUTING. This is because
the defrag priority happens to be higher than that of RAW.
[include/uapi/linux/netfilter_ipv4.h]
enum nf_ip_hook_priorities {
NF_IP_PRI_FIRST = INT_MIN,
NF_IP_PRI_CONNTRACK_DEFRAG = -400,
NF_IP_PRI_RAW = -300,
NF_IP_PRI_SELINUX_FIRST = -225,
NF_IP_PRI_CONNTRACK = -200,
By changing the ordering of NF_IP_PRI_CONNTRACK_DEFRAG to -210 (some
lower value)
instead of -400 (before CONNTRACK), I was able to skip the defrag when
NOTRACK was
set. Do you think this is a possible solution.
diff --git a/include/uapi/linux/netfilter_ipv4.h
b/include/uapi/linux/netfilter_ipv4.h
index 91ddd1f..13dc767 100644
--- a/include/uapi/linux/netfilter_ipv4.h
+++ b/include/uapi/linux/netfilter_ipv4.h
@@ -56,9 +56,9 @@
enum nf_ip_hook_priorities {
NF_IP_PRI_FIRST = INT_MIN,
- NF_IP_PRI_CONNTRACK_DEFRAG = -400,
NF_IP_PRI_RAW = -300,
NF_IP_PRI_SELINUX_FIRST = -225,
+ NF_IP_PRI_CONNTRACK_DEFRAG = -210,
NF_IP_PRI_CONNTRACK = -200,
NF_IP_PRI_MANGLE = -150,
NF_IP_PRI_NAT_DST = -100,
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
prev parent reply other threads:[~2017-11-08 20:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-04 2:28 [PATCH nf-next] netfilter: nf_defrag_ipv4: Add sysctl to disable per interface Subash Abhinov Kasiviswanathan
2017-11-04 9:07 ` Steffen Klassert
2017-11-07 10:30 ` Florian Westphal
2017-11-07 18:58 ` Subash Abhinov Kasiviswanathan
2017-11-08 4:34 ` Pablo Neira Ayuso
2017-11-08 20:46 ` Subash Abhinov Kasiviswanathan [this message]
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=b0a138969da40368de9a117a1045c5c5@codeaurora.org \
--to=subashab@codeaurora.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=steffen.klassert@secunet.com \
/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).