chiark / gitweb /
parse-util: add explicit parsers for MTU values
authorLennart Poettering <lennart@poettering.net>
Fri, 20 Apr 2018 14:28:12 +0000 (16:28 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
commit4c3d43ed2482df213a77abd68b17af149baf9a55
tree657fe589b0927a5a667f8391bd9d834ec8807015
parent91723aa6753c9412b6640242c4afe058e999551d
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