summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDmitry Safonov <0x7f454c46@gmail.com>2024-06-07 01:25:56 +0200
committerDavid S. Miller <davem@davemloft.net>2024-06-12 07:39:04 +0200
commit72863087f635367323693b9ab83c3107e0353c5f (patch)
treec1c873f9035791be156546af13b4324b57e99fde /net/ipv4
parentnet/tcp: Use static_branch_tcp_{md5,ao} to drop ifdefs (diff)
downloadlinux-72863087f635367323693b9ab83c3107e0353c5f.tar.xz
linux-72863087f635367323693b9ab83c3107e0353c5f.zip
net/tcp: Add a helper tcp_ao_hdr_maclen()
It's going to be used more in TCP-AO tracepoints. Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp_ao.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ao.c b/net/ipv4/tcp_ao.c
index 37c42b63ff99..50ae43c92829 100644
--- a/net/ipv4/tcp_ao.c
+++ b/net/ipv4/tcp_ao.c
@@ -884,8 +884,8 @@ tcp_ao_verify_hash(const struct sock *sk, const struct sk_buff *skb,
const struct tcp_ao_hdr *aoh, struct tcp_ao_key *key,
u8 *traffic_key, u8 *phash, u32 sne, int l3index)
{
- u8 maclen = aoh->length - sizeof(struct tcp_ao_hdr);
const struct tcphdr *th = tcp_hdr(skb);
+ u8 maclen = tcp_ao_hdr_maclen(aoh);
void *hash_buf = NULL;
if (maclen != tcp_ao_maclen(key)) {