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 {