diff options
author | yangxingwu | 2019-07-10 15:14:10 +0200 |
---|---|---|
committer | David S. Miller | 2019-07-11 23:43:25 +0200 |
commit | 416e8126a2672f6e91e9e81c6f5c07cf46808b13 (patch) | |
tree | 022663d29eb3e3629f3004d2b02c72deb2e89209 /net/ipv6/netfilter/nf_conntrack_reasm.c | |
parent | hsr: switch ->dellink() to ->ndo_uninit() (diff) | |
download | kernel-qcow2-linux-416e8126a2672f6e91e9e81c6f5c07cf46808b13.tar.gz kernel-qcow2-linux-416e8126a2672f6e91e9e81c6f5c07cf46808b13.tar.xz kernel-qcow2-linux-416e8126a2672f6e91e9e81c6f5c07cf46808b13.zip |
ipv6: Use ipv6_authlen for len
The length of AH header is computed manually as (hp->hdrlen+2)<<2.
However, in include/linux/ipv6.h, a macro named ipv6_authlen is
already defined for exactly the same job. This commit replaces
the manual computation code with the macro.
Signed-off-by: yangxingwu <xingwu.yang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/netfilter/nf_conntrack_reasm.c')
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_reasm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 398e1df41406..0f82c150543b 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c @@ -414,7 +414,7 @@ find_prev_fhdr(struct sk_buff *skb, u8 *prevhdrp, int *prevhoff, int *fhoff) if (skb_copy_bits(skb, start, &hdr, sizeof(hdr))) BUG(); if (nexthdr == NEXTHDR_AUTH) - hdrlen = (hdr.hdrlen+2)<<2; + hdrlen = ipv6_authlen(&hdr); else hdrlen = ipv6_optlen(&hdr); |