aboutsummaryrefslogtreecommitdiffstats
path: root/misc-utils/lsblk.c
diff options
context:
space:
mode:
authorStanislav Brabec <sbrabec@suse.cz>2025-10-08 01:14:32 +0200
committerStanislav Brabec <sbrabec@suse.cz>2025-10-08 01:19:29 +0200
commit60c5c0516e6ce52863b12343a1cd276423ab3bae (patch)
treedc6785b2419a238cda41c3fc7c2cc2dcb46eba9b /misc-utils/lsblk.c
parent83a9a2226b1d1f59b1555100b6c4f2f8b3e7e4cf (diff)
downloadutil-linux-60c5c0516e6ce52863b12343a1cd276423ab3bae.tar.gz
netaddrq: Fix crash if there are no IP addresses
If there are no IP addresses, ul_netaddrq_bestaddr() returns threshold ULNETLINK_RATING_BAD, but there were no addresses in the best array, and best_ifaceq remains unset, which caused crash. Setting the initial threshold to __ULNETLINK_RATING_MAX and checking for that value fixes that. And more, it also allows to accept IP addresses with ULNETLINK_RATING_BAD rating. Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Diffstat (limited to 'misc-utils/lsblk.c')
0 files changed, 0 insertions, 0 deletions