X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fpackets.c;h=fa732823755513f7380503e09648ee242b1fb114;hb=305b76debf72120672a8ba81d3356b6dccb1da9a;hp=812d1af9372a55bb05f36ee11e8302254982dfd5;hpb=85b20fd6ee585f462e012fbcc7f966a81edab2ed;p=sliver-openvswitch.git diff --git a/lib/packets.c b/lib/packets.c index 812d1af93..fa7328237 100644 --- a/lib/packets.c +++ b/lib/packets.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc. + * Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ #include #include "packets.h" -#include #include #include #include @@ -711,9 +710,7 @@ 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)) && - flow->nw_proto == IPPROTO_TCP && packet->l7) { + if (is_ip_any(flow) && flow->nw_proto == IPPROTO_TCP && packet->l7) { const struct tcp_header *tcp = packet->l4; return TCP_FLAGS(tcp->tcp_ctl); } else {