Use the innermost dl_type when decoding L3 and L4 data from a packet. Signed-off-by: Simon Horman <ho...@verge.net.au>
--- v2.12 - v2.16 * Use flow_innermost_dl_type helper v2.11 * First post --- lib/packets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/packets.c b/lib/packets.c index 8d10dc8..a52bf6e 100644 --- a/lib/packets.c +++ b/lib/packets.c @@ -897,8 +897,8 @@ packet_set_udp_port(struct ofpbuf *packet, ovs_be16 src, ovs_be16 dst) uint8_t packet_get_tcp_flags(const struct ofpbuf *packet, const struct flow *flow) { - if ((flow->dl_type == htons(ETH_TYPE_IP) || - flow->dl_type == htons(ETH_TYPE_IPV6)) && + ovs_be16 dl_type = flow_innermost_dl_type(flow); + if ((dl_type == htons(ETH_TYPE_IP) || dl_type == htons(ETH_TYPE_IPV6)) && flow->nw_proto == IPPROTO_TCP && packet->l7) { const struct tcp_header *tcp = packet->l4; return TCP_FLAGS(tcp->tcp_ctl); -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev