Use the innermost dl_type when decoding L3 and L4 data from a packet. Signed-off-by: Simon Horman <ho...@verge.net.au>
--- v2.13 - v2.18 * No change v2.12 * Use flow_innermost_dl_type helper v2.11 * First post --- lib/odp-util.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index 355a3af..f3f66b7 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -2325,14 +2325,16 @@ static void commit_set_nw_action(const struct flow *flow, struct flow *base, struct ofpbuf *odp_actions) { + ovs_be16 dl_type = flow_innermost_dl_type(flow); + /* Check if flow really have an IP header. */ if (!flow->nw_proto) { return; } - if (base->dl_type == htons(ETH_TYPE_IP)) { + if (dl_type == htons(ETH_TYPE_IP)) { commit_set_ipv4_action(flow, base, odp_actions); - } else if (base->dl_type == htons(ETH_TYPE_IPV6)) { + } else if (dl_type == htons(ETH_TYPE_IPV6)) { commit_set_ipv6_action(flow, base, odp_actions); } } -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev