mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 22:35:15 +00:00
packet: packet_get_tcp_flags: use flow's innermost dl_type
Use the innermost dl_type when decoding L3 and L4 data from a packet. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -887,7 +887,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)
|
||||
{
|
||||
if (is_ip_any(flow) && flow->nw_proto == IPPROTO_TCP && packet->l7) {
|
||||
ovs_be16 dl_type = flow_innermost_dl_type(flow);
|
||||
if (dl_type_is_ip_any(dl_type) &&
|
||||
flow->nw_proto == IPPROTO_TCP && packet->l7) {
|
||||
const struct tcp_header *tcp = packet->l4;
|
||||
return TCP_FLAGS(tcp->tcp_ctl);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user