]> git.ipfire.org Git - thirdparty/openvpn.git/commit
options: Introduce atoi_constrained and review usages of atoi_warn
authorFrank Lichtenheld <frank@lichtenheld.com>
Tue, 2 Sep 2025 14:46:50 +0000 (16:46 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 2 Sep 2025 17:11:13 +0000 (19:11 +0200)
commita01c909c3be5c06c9be06540f5c3aa04b449e9c9
treee3dc4c4ef163e582d4d5375245e0a7e3a1c6ecbc
parentfccdb21733d2826bcdc080fdfa93b0283b5231b8
options: Introduce atoi_constrained and review usages of atoi_warn

This is a more powerful version of atoi_warn that can
- check minimum and maximum values
- report error seperately from parsed value

This can be used to simplify a lot of option parsing.

Change-Id: Ibc7526d59c1de17a0f9d8ed88f75c6f070ab11e7
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Message-Id: <20250902144657.11854-1-gert@greenie.muc.de>
URL: https://sourceforge.net/p/openvpn/mailman/message/59228172/
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c
src/openvpn/options_util.c
src/openvpn/options_util.h
tests/unit_tests/openvpn/test_misc.c