| 379 | } |
| 380 | |
| 381 | swoc::Errata |
| 382 | IpAllow::YAMLLoadIPAddrRange(const YAML::Node &node, IpMap *map, IpAllow::Record const *record) |
| 383 | { |
| 384 | if (!node.IsScalar()) { |
| 385 | return swoc::Errata(ERRATA_ERROR, "{} Expected IP address range at {}, found non-literal.", this, node.Mark()); |
| 386 | } |
| 387 | |
| 388 | swoc::TextView ip_range(node.Scalar()); |
| 389 | if (swoc::IPRange r; r.load(ip_range)) { |
| 390 | map->fill(r, record); |
| 391 | } else { |
| 392 | return swoc::Errata(ERRATA_ERROR, "{} {} - '{}' is not a valid range.", this, node.Mark(), node.Scalar()); |
| 393 | } |
| 394 | return {}; |
| 395 | } |
| 396 | |
| 397 | swoc::Errata |
| 398 | IpAllow::YAMLLoadIPCategory(const YAML::Node &node, IpMap *map, IpAllow::Record const *record) |