odp-util: Fix VLAN parsing behavior in parse_8021q_onward().
authorBen Pfaff <blp@nicira.com>
Tue, 31 Dec 2013 18:35:27 +0000 (10:35 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 20 Mar 2014 21:06:27 +0000 (14:06 -0700)
commit3e634810dac461f2e0dbfef0d0134ed5471c7a38
tree9e5bb721bb5165cb1c8bc8ea5d01e92ad601e743
parent6d328fa23ddf5c752ac1583c1bf5b2ebf433e813
odp-util: Fix VLAN parsing behavior in parse_8021q_onward().

Anytime there is a VLAN the flow needs to properly reflect that.  Keeping
the TPID in dl_type never makes sense and will probably cause problems.
The existing code did the right thing in the common case but not in corner
cases where it returned ODP_FIT_TOO_MUCH or ODP_FIT_TOO_LITTLE (the cases
where it returned an error don't matter since nothing looks at the flow
in that case).

Found by inspection.

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/odp-util.c