From: Simon Horman <simon.horman@netronome.com>
To: Jiri Pirko <jiri@mellanox.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>
Cc: Dinan Gunawardena <dinan.gunawardena@netronome.com>,
netdev@vger.kernel.org, oss-drivers@netronome.com,
Benjamin LaHaise <benjamin.lahaise@netronome.com>,
Simon Horman <simon.horman@netronome.com>
Subject: [PATCH/RFC net-next v2 0/4] net/sched: cls_flower: avoid false matching of truncated packets
Date: Fri, 5 May 2017 14:47:02 +0200 [thread overview]
Message-ID: <1493988426-22854-1-git-send-email-simon.horman@netronome.com> (raw)
Hi,
this series is intended to avoid false-positives which match
truncated packets against flower classifiers which match on:
* zero L4 ports or;
* zero ICMP code or type
This requires updating the flow dissector to return an error in such cases
and updating flower to not match on the result of a failed dissection.
In the case of UDP this results in a behavioural change to users of
flow_keys_dissector_keys[] and flow_keys_dissector_symmetric_keys[] -
dissection will fail on truncated packets where the IP protocol of the
packets indicates ports should be present (according to skb_flow_get_ports()).
The last patch of the series builds on the above to allow users to specify
a policy for how to handle packets whose dissection fails.
I will separately provide RFC patches to iproute2 to allow exercising the
last patch.
Changes between RFCv1 and RFCv2
* Rename new attribute in last path TCA_FLOWER_META_TRUNCATED
after discussion with Jamal.
* Update changelog for "flow dissector" patches to make it clearer what
the before and after behaviours are.
Simon Horman (4):
flow dissector: return error on port dissection under-run
flow dissector: return error on icmp dissection under-run
net/sched: cls_flower: do not match if dissection fails
net/sched: cls_flower: allow control of tree traversal on packet parse
errors
include/linux/skbuff.h | 11 +++--
include/uapi/linux/pkt_cls.h | 2 +
net/core/flow_dissector.c | 105 ++++++++++++++++++++++++-------------------
net/sched/cls_flower.c | 46 ++++++++++++++-----
4 files changed, 106 insertions(+), 58 deletions(-)
--
2.1.4
next reply other threads:[~2017-05-05 12:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-05 12:47 Simon Horman [this message]
2017-05-05 12:47 ` [PATCH/RFC net-next v2 1/4] flow dissector: return error on port dissection under-run Simon Horman
2017-05-08 11:21 ` Jamal Hadi Salim
2017-05-05 12:47 ` [PATCH/RFC net-next v2 2/4] flow dissector: return error on icmp " Simon Horman
2017-05-08 11:21 ` Jamal Hadi Salim
2017-05-05 12:47 ` [PATCH/RFC net-next v2 3/4] net/sched: cls_flower: do not match if dissection fails Simon Horman
2017-05-08 11:26 ` Jamal Hadi Salim
2017-05-05 12:47 ` [PATCH/RFC net-next v2 4/4] net/sched: cls_flower: allow control of tree traversal on packet parse errors Simon Horman
2017-05-05 22:44 ` Cong Wang
2017-05-08 11:32 ` Jamal Hadi Salim
2017-05-08 11:54 ` Simon Horman
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=1493988426-22854-1-git-send-email-simon.horman@netronome.com \
--to=simon.horman@netronome.com \
--cc=benjamin.lahaise@netronome.com \
--cc=dinan.gunawardena@netronome.com \
--cc=jhs@mojatatu.com \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
--cc=xiyou.wangcong@gmail.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).