net/enic: fix raw item length check
authorHyong Youb Kim <hyonkim@cisco.com>
Tue, 9 Apr 2019 06:40:26 +0000 (23:40 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 12 Apr 2019 09:02:02 +0000 (11:02 +0200)
commit37b07be28a3fcdde2724cc467bdb3c82bf35deef
treece63402cf5c96d6cfe7399c2dbd9052c645e34b5
parent97d37d2c1f6b3c36439ce9f323223ed4d40e3c00
net/enic: fix raw item length check

Currently, the raw item is always preceded by a UDP header, and both
land in the L4 pattern buffer. So consider the UDP header size when
checking if the raw spec fits in the L4 buffer.

Coverity issue: 336796, 336850
Fixes: 477959e6eeb0 ("net/enic: enable limited support for raw flow item")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
drivers/net/enic/enic_flow.c