aboutsummaryrefslogtreecommitdiffstats
path: root/net/lapb/lapb_out.c
diff options
context:
space:
mode:
authorVisa Hankala <[email protected]>2020-12-30 16:15:53 +0000
committerSteffen Klassert <[email protected]>2021-01-04 09:35:09 +0000
commitda64ae2d35d3673233f0403b035d4c6acbf71965 (patch)
tree075b05b9a9c7fb640fc74c82d134539a342fef08 /net/lapb/lapb_out.c
parentselftests: xfrm: fix test return value override issue in xfrm_policy.sh (diff)
downloadkernel-da64ae2d35d3673233f0403b035d4c6acbf71965.tar.gz
kernel-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 <[email protected]> Acked-by: Florian Westphal <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
Diffstat (limited to 'net/lapb/lapb_out.c')
0 files changed, 0 insertions, 0 deletions