summaryrefslogtreecommitdiff
path: root/accel-pppd/pwdb.h
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2018-12-07 17:37:44 +0100
committerDmitry Kozlov <xeb@mail.ru>2018-12-08 07:51:37 +0300
commit7951559fbc6d75e930ee50a0ed18da3912439e25 (patch)
treed563ba6a6e300393e7a7b4cd6c66f051cf496935 /accel-pppd/pwdb.h
parent093baccac54573eed54fa2650c19ecaeed3065a5 (diff)
downloadaccel-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