Ofproto always provides a valid pointer to a mask, but the mask length is zero when megaflows are disabled. Check the mask length before checking the mask, as the check can fail otherwise.
Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com> --- lib/dpif-netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 911cb5d..f6fc5ee 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -796,7 +796,7 @@ dpif_netdev_flow_mask_from_nlattrs(const struct nlattr *key, uint32_t key_len, odp_port_t in_port; if (odp_flow_key_to_flow(key, key_len, flow) - || (mask_key + || (mask_key && mask_key_len && odp_flow_key_to_mask(mask_key, mask_key_len, mask, flow))) { /* This should not happen: it indicates that odp_flow_key_from_flow() * and odp_flow_key_to_flow() disagree on the acceptable form of a flow -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev