]> git.ipfire.org Git - thirdparty/systemd.git/commit
json-util: generalize json_dispatch_ifindex()
authorLennart Poettering <lennart@poettering.net>
Fri, 1 Nov 2024 17:01:08 +0000 (18:01 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 4 Nov 2024 10:42:37 +0000 (11:42 +0100)
commitdfaff662a08e97ff2e3ad640594b40c3c5adb82b
tree0792f3cc237da3a314818964e5599ee0849fdc5a
parent0e44f02e2fd0fd47849227f4d6d8315f905e1287
json-util: generalize json_dispatch_ifindex()

Let's move the helper from nss-resolve.c to generic code, as it's going
to be useful in #34640.

Also, let's tighten the rules, and refuse negative ifindexes, because
they are invalid.
src/libsystemd/sd-json/json-util.c
src/libsystemd/sd-json/json-util.h
src/nss-resolve/nss-resolve.c