diff --git a/contrib/ofed/libibverbs/cmd.c b/contrib/ofed/libibverbs/cmd.c index 9c79757f0e60..e165923184c8 100644 --- a/contrib/ofed/libibverbs/cmd.c +++ b/contrib/ofed/libibverbs/cmd.c @@ -1910,7 +1910,7 @@ static int ib_spec_to_kern_spec(struct ibv_flow_spec *ib_spec, case IBV_FLOW_SPEC_UDP | IBV_FLOW_SPEC_INNER: kern_spec->tcp_udp.size = sizeof(struct ibv_kern_spec_tcp_udp); memcpy(&kern_spec->tcp_udp.val, &ib_spec->tcp_udp.val, - sizeof(struct ibv_flow_ipv4_filter)); + sizeof(struct ibv_flow_tcp_udp_filter)); memcpy(&kern_spec->tcp_udp.mask, &ib_spec->tcp_udp.mask, sizeof(struct ibv_flow_tcp_udp_filter)); break; @@ -1922,6 +1922,7 @@ static int ib_spec_to_kern_spec(struct ibv_flow_spec *ib_spec, sizeof(struct ibv_flow_gre_filter)); break; case IBV_FLOW_SPEC_MPLS: + case IBV_FLOW_SPEC_MPLS | IBV_FLOW_SPEC_INNER: kern_spec->mpls.size = sizeof(struct ib_uverbs_flow_spec_mpls); memcpy(&kern_spec->mpls.val, &ib_spec->mpls.val, sizeof(struct ibv_flow_mpls_filter));