Commit 12c227ec authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

flow_dissector: do not break if ports are not needed in flowlabel

This restored previous behaviour. If caller does not want ports to be
filled, we should not break.

Fixes: 06635a35 ("flow_dissect: use programable dissector in skb_flow_dissect and friends")
Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bd5850d3
...@@ -221,13 +221,13 @@ bool __skb_flow_dissect(const struct sk_buff *skb, ...@@ -221,13 +221,13 @@ bool __skb_flow_dissect(const struct sk_buff *skb,
key_basic->ip_proto = ip_proto; key_basic->ip_proto = ip_proto;
key_basic->thoff = (u16)nhoff; key_basic->thoff = (u16)nhoff;
if (!skb_flow_dissector_uses_key(flow_dissector, if (skb_flow_dissector_uses_key(flow_dissector,
FLOW_DISSECTOR_KEY_PORTS)) FLOW_DISSECTOR_KEY_PORTS)) {
break;
key_ports = skb_flow_dissector_target(flow_dissector, key_ports = skb_flow_dissector_target(flow_dissector,
FLOW_DISSECTOR_KEY_PORTS, FLOW_DISSECTOR_KEY_PORTS,
target_container); target_container);
key_ports->ports = flow_label; key_ports->ports = flow_label;
}
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment