net: fix inner L2 length in packet type parser
authorOlivier Matz <olivier.matz@6wind.com>
Mon, 11 Sep 2017 14:57:22 +0000 (16:57 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 5 Oct 2017 21:34:45 +0000 (23:34 +0200)
commitb081c1dd2ec64c4f3cc18723ccb7aa1601985bb0
tree1cd7ed838f79aa9e00d379132dd99f8311ecfc0a
parenteffd92b96a978fa5d08167bd08e5cc11f6982f79
net: fix inner L2 length in packet type parser

The inner L2 length returned by rte_net_get_ptype() is not
properly initialized. If the caller does not zero the header
lengths structure, the inner_l2 field will be undefined.

Fix it by initializing inner_l2 to 0 when parsing a inner layer.

Fixes: 2c15c5377da2 ("net: support NVGRE in software packet type parser")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_net/rte_net.c