mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
net: flow_dissector: fix thoff for IPPROTO_AH
In commit 8ed781668d
("flow_keys: include thoff into flow_keys for
later usage"), we missed that existing code was using nhoff as a
temporary variable that could not always contain transport header
offset.
This is not a problem for TCP/UDP because port offset (@poff)
is 0 for these protocols.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Nikolay Aleksandrov <nikolay@redhat.com>
Acked-by: Nikolay Aleksandrov <nikolay@redhat.com>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8386040b76
commit
b86783587b
@ -154,8 +154,8 @@ ipv6:
|
||||
if (poff >= 0) {
|
||||
__be32 *ports, _ports;
|
||||
|
||||
nhoff += poff;
|
||||
ports = skb_header_pointer(skb, nhoff, sizeof(_ports), &_ports);
|
||||
ports = skb_header_pointer(skb, nhoff + poff,
|
||||
sizeof(_ports), &_ports);
|
||||
if (ports)
|
||||
flow->ports = *ports;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user