If the encap_dl_type is set then it indicates information about the dl_type of an encapsulated frame and should be used when decoding L3 and L4 information.
Signed-off-by: Simon Horman <ho...@verge.net.au> --- lib/odp-util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index 01c79e6..4b6e4f0 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -2304,14 +2304,18 @@ static void commit_set_nw_action(const struct flow *flow, struct flow *base, struct ofpbuf *odp_actions) { + ovs_be16 dl_type = flow->encap_dl_type + ? flow->encap_dl_type + : flow->dl_type; + /* 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