From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: tom@herbertland.com
Subject: [patch net-next] flow_dissector: do not break if ports are not needed in flowlabel
Date: Fri, 22 May 2015 11:05:58 +0200 [thread overview]
Message-ID: <1432285558-19470-1-git-send-email-jiri@resnulli.us> (raw)
This restored previous behaviour. If caller does not want ports to be
filled, we should not break.
Fixes: 06635a35d13d ("flow_dissect: use programable dissector in skb_flow_dissect and friends")
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
net/core/flow_dissector.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 703d059..1f2d893 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -221,13 +221,13 @@ flow_label:
key_basic->ip_proto = ip_proto;
key_basic->thoff = (u16)nhoff;
- if (!skb_flow_dissector_uses_key(flow_dissector,
- FLOW_DISSECTOR_KEY_PORTS))
- break;
- key_ports = skb_flow_dissector_target(flow_dissector,
- FLOW_DISSECTOR_KEY_PORTS,
- target_container);
- key_ports->ports = flow_label;
+ if (skb_flow_dissector_uses_key(flow_dissector,
+ FLOW_DISSECTOR_KEY_PORTS)) {
+ key_ports = skb_flow_dissector_target(flow_dissector,
+ FLOW_DISSECTOR_KEY_PORTS,
+ target_container);
+ key_ports->ports = flow_label;
+ }
return true;
}
--
1.9.3
next reply other threads:[~2015-05-22 9:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 9:05 Jiri Pirko [this message]
2015-05-22 18:12 ` [patch net-next] flow_dissector: do not break if ports are not needed in flowlabel David Miller
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=1432285558-19470-1-git-send-email-jiri@resnulli.us \
--to=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.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).