]> git.ipfire.org Git - thirdparty/systemd.git/commit
socket-util: tighten parsing of ifnames 18611/head
authorLennart Poettering <lennart@poettering.net>
Mon, 15 Feb 2021 21:49:36 +0000 (22:49 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 15 Feb 2021 21:51:16 +0000 (22:51 +0100)
commitee29bd5dc5b08427a919ff84eeb06ee4158a3ae2
tree20b12a609dcccc310bb8b927e64a5408801a3e65
parente774e6fb0420e7b441aedbe0d013bb51aa7b5337
socket-util: tighten parsing of ifnames

Numeric ifnames should be acceptable only if that's enabled by flag, and
refused otherwise. Hence, let's parse as ifindex first, and if that
works decide. Finally, let's refuse any numeric ifnames that are not
valid ifindexs, but look like them.
src/basic/socket-util.c