X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fpackets.c;h=8fb7f6b0320fac2a7fabcb02f6bd820420a91e8a;hb=734ec5ec1349;hp=9d861dab1c8996847bbe2cd8f287a9f72f05e65b;hpb=42d89d2a61a8c9e550a3a98cf7aaebce23f1b033;p=sliver-openvswitch.git diff --git a/lib/packets.c b/lib/packets.c index 9d861dab1..8fb7f6b03 100644 --- a/lib/packets.c +++ b/lib/packets.c @@ -487,9 +487,9 @@ 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) { - /* XXX IPv6? */ - if (flow->dl_type == htons(ETH_TYPE_IP) && packet->l4 - && flow->nw_proto == IPPROTO_TCP && packet->l7) { + if ((flow->dl_type == htons(ETH_TYPE_IP) || + flow->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); } else {