diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2018-12-07 17:37:44 +0100 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2018-12-08 07:51:37 +0300 |
commit | 7951559fbc6d75e930ee50a0ed18da3912439e25 (patch) | |
tree | d563ba6a6e300393e7a7b4cd6c66f051cf496935 /accel-pppd/pwdb.h | |
parent | 093baccac54573eed54fa2650c19ecaeed3065a5 (diff) | |
download | accel-ppp-7951559fbc6d75e930ee50a0ed18da3912439e25.tar.gz accel-ppp-7951559fbc6d75e930ee50a0ed18da3912439e25.zip |
iprange: rework range parsing using u_parse_*() functions
Now that we have primitives for parsing IPv4 ranges, let's use them to
simplify parse_iprange().
Try u_parse_ip4cidr() first. In case of failure, try u_parse_ip4range().
If any of them succeeds, verify that there aren't spurious data
following the range definition. If everything is valid, either load the
range or disable the module (if the range is 0.0.0.0/0).
The diff is a bit ugly, but the implementation should be much clearer.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/pwdb.h')
0 files changed, 0 insertions, 0 deletions