diff options
author | Xiang Gao <qasdfgtyuiop@gmail.com> | 2017-09-20 19:18:17 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-20 23:45:18 +0300 |
commit | d4e1b299ec2853dd3d90b71ae86fa2626e60dc25 (patch) | |
tree | 69c5ae532cdbbec055b57c4a2d6bc74238e8f8f3 /net/ipv6/exthdrs_core.c | |
parent | 8ca712c373a462cfa1b62272870b6c2c74aa83f9 (diff) | |
download | linux-d4e1b299ec2853dd3d90b71ae86fa2626e60dc25.tar.xz |
ipv6: Use ipv6_authlen for len in ipv6_skip_exthdr
In ipv6_skip_exthdr, the lengh 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: Xiang Gao <qasdfgtyuiop@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/exthdrs_core.c')
-rw-r--r-- | net/ipv6/exthdrs_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/exthdrs_core.c b/net/ipv6/exthdrs_core.c index 305e2ed730bf..115d60919f72 100644 --- a/net/ipv6/exthdrs_core.c +++ b/net/ipv6/exthdrs_core.c @@ -99,7 +99,7 @@ int ipv6_skip_exthdr(const struct sk_buff *skb, int start, u8 *nexthdrp, break; hdrlen = 8; } else if (nexthdr == NEXTHDR_AUTH) - hdrlen = (hp->hdrlen+2)<<2; + hdrlen = ipv6_authlen(hp); else hdrlen = ipv6_optlen(hp); |