mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-01 12:04:08 +00:00
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: Michael Mao <mmao@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
parent
bf32fecdc1
commit
c55177e3e1
1 changed files with 2 additions and 1 deletions
|
@ -182,7 +182,8 @@ void ovs_flow_used(struct sw_flow *flow, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
u8 tcp_flags = 0;
|
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 &&
|
flow->key.ip.proto == IPPROTO_TCP &&
|
||||||
likely(skb->len >= skb_transport_offset(skb) + sizeof(struct tcphdr))) {
|
likely(skb->len >= skb_transport_offset(skb) + sizeof(struct tcphdr))) {
|
||||||
u8 *tcp = (u8 *)tcp_hdr(skb);
|
u8 *tcp = (u8 *)tcp_hdr(skb);
|
||||||
|
|
Loading…
Add table
Reference in a new issue