X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fodp-util.c;h=873e05aea57b1b6cf50c35fe01a39a387c80157d;hb=21e70add7e5fc18c519ca3d46691230bf136b1e1;hp=b10f72e1eb09375bb32aaa9bf80e34639ca95e85;hpb=5054d6fd32d5dd3354c1aed1bfa9fb2b7979324e;p=sliver-openvswitch.git diff --git a/lib/odp-util.c b/lib/odp-util.c index b10f72e1e..873e05aea 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -3217,8 +3217,9 @@ odp_flow_key_to_flow__(const struct nlattr *key, size_t key_len, return ODP_FIT_ERROR; } - if ((is_mask && (src_flow->vlan_tci & htons(VLAN_CFI))) || - (!is_mask && src_flow->dl_type == htons(ETH_TYPE_VLAN))) { + if (is_mask + ? (src_flow->vlan_tci & htons(VLAN_CFI)) != 0 + : src_flow->dl_type == htons(ETH_TYPE_VLAN)) { return parse_8021q_onward(attrs, present_attrs, out_of_range_attr, expected_attrs, flow, key, key_len, src_flow); }