Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c55177e3 authored by Jesse Gross's avatar Jesse Gross
Browse files

openvswitch: Enable retrieval of TCP flags from IPv6 traffic.



We currently check that a packet is IPv4 and TCP before fetching the
TCP flags.  This enables fetching from IPv6 packets as well.

Reported-by: default avatarMichael Mao <mmao@nicira.com>
Signed-off-by: default avatarJesse Gross <jesse@nicira.com>
parent bf32fecd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -182,7 +182,8 @@ void ovs_flow_used(struct sw_flow *flow, struct sk_buff *skb)
{
	u8 tcp_flags = 0;

	if (flow->key.eth.type == htons(ETH_P_IP) &&
	if ((flow->key.eth.type == htons(ETH_P_IP) ||
	     flow->key.eth.type == htons(ETH_P_IPV6)) &&
	    flow->key.ip.proto == IPPROTO_TCP &&
	    likely(skb->len >= skb_transport_offset(skb) + sizeof(struct tcphdr))) {
		u8 *tcp = (u8 *)tcp_hdr(skb);