MCPcopy Create free account
hub / github.com/apache/trafficserver / YAMLLoadCategoryIpRange

Method YAMLLoadCategoryIpRange

src/proxy/IPAllow.cc:679–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677}
678
679swoc::Errata
680IpAllow::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}

Callers 1

Calls 5

ErrataClass · 0.85
ScalarMethod · 0.80
MarkMethod · 0.45
loadMethod · 0.45
fillMethod · 0.45

Tested by

no test coverage detected