• G
    iprange: rework range parsing using u_parse_*() functions · 7951559f
    Guillaume Nault 提交于
    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: NGuillaume Nault <g.nault@alphalink.fr>
    7951559f
iprange.c 5.0 KB