]> git.ipfire.org Git - thirdparty/systemd.git/commit
parse-util: add explicit parsers for MTU values
authorLennart Poettering <lennart@poettering.net>
Fri, 20 Apr 2018 14:28:12 +0000 (16:28 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 26 Apr 2018 11:51:44 +0000 (13:51 +0200)
commitf91c6093efba5738436adb41aa4b6d0abc66cdc9
treeb67c122a4a39899996b10e0d1dfb094b7601f1ca
parent4d7c3570a6cd057cb131d53c19edae8258ed914f
parse-util: add explicit parsers for MTU values

We use MTUs all over the place, let's add a unified, strict parser for
it, that takes MTU ranges into account.

We already have parse_ifindex() close-by, hence this appears to be a
natural addition, in particular as the range checking is not entirely
trivial to do, as it depends on the protocol used.
src/basic/parse-util.c
src/basic/parse-util.h
src/test/test-parse-util.c