diff options
author | Visa Hankala <visa@hankala.org> | 2020-12-30 19:15:53 +0300 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2021-01-04 12:35:09 +0300 |
commit | da64ae2d35d3673233f0403b035d4c6acbf71965 (patch) | |
tree | 075b05b9a9c7fb640fc74c82d134539a342fef08 /tools/perf/util/s390-cpumsf.c | |
parent | f6e9ceb7a7fc321a31a9dde93a99b7b4b016a3b3 (diff) | |
download | linux-da64ae2d35d3673233f0403b035d4c6acbf71965.tar.xz |
xfrm: Fix wraparound in xfrm_policy_addr_delta()
Use three-way comparison for address components to avoid integer
wraparound in the result of xfrm_policy_addr_delta(). This ensures
that the search trees are built and traversed correctly.
Treat IPv4 and IPv6 similarly by returning 0 when prefixlen == 0.
Prefix /0 has only one equivalence class.
Fixes: 9cf545ebd591d ("xfrm: policy: store inexact policies in a tree ordered by destination address")
Signed-off-by: Visa Hankala <visa@hankala.org>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'tools/perf/util/s390-cpumsf.c')
0 files changed, 0 insertions, 0 deletions