diff options
author | 2020-12-30 16:15:53 +0000 | |
---|---|---|
committer | 2021-01-04 10:35:09 +0100 | |
commit | da64ae2d35d3673233f0403b035d4c6acbf71965 (patch) | |
tree | 075b05b9a9c7fb640fc74c82d134539a342fef08 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | selftests: xfrm: fix test return value override issue in xfrm_policy.sh (diff) | |
download | wireguard-linux-da64ae2d35d3673233f0403b035d4c6acbf71965.tar.xz wireguard-linux-da64ae2d35d3673233f0403b035d4c6acbf71965.zip |
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/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions