]> git.ipfire.org Git - thirdparty/systemd.git/commit
nss-resolve: fix the ip addr family validity check method
authorjouyouyun <yanbowen@uniontech.com>
Wed, 5 Nov 2025 10:03:34 +0000 (18:03 +0800)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 5 Nov 2025 22:45:40 +0000 (07:45 +0900)
commitfea7f5d68b5a6272ce8989e872a57b42121b5205
tree6707a2c665212df8ce77da012a4e46f40963fbc6
parent8ab6925c5e889c238d282fef3061f7651755eb5e
nss-resolve: fix the ip addr family validity check method

`i` only counts the number of matches with the current family,
while `n_addresses` counts the number of matches with the family INET or INET6.
If the address contains both INET and INET6, `assert(i == n_addresses)` will fail.
src/nss-resolve/nss-resolve.c