| 677 | } |
| 678 | |
| 679 | swoc::Errata |
| 680 | IpAllow::YAMLLoadCategoryIpRange(const YAML::Node &node, swoc::IPSpace<bool> &space) |
| 681 | { |
| 682 | if (!node.IsScalar()) { |
| 683 | return swoc::Errata(ERRATA_ERROR, "{} Expected IP address range for category at {}, found non-literal.", this, node.Mark()); |
| 684 | } |
| 685 | |
| 686 | swoc::TextView ip_range(node.Scalar()); |
| 687 | if (swoc::IPRange r; r.load(ip_range)) { |
| 688 | space.fill(r, true); |
| 689 | } else { |
| 690 | return swoc::Errata(ERRATA_ERROR, "{} {} - '{}' is not a valid range.", this, node.Mark(), node.Scalar()); |
| 691 | } |
| 692 | |
| 693 | return {}; |
| 694 | } |