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

Method load

src/iocore/net/SNIActionPerformer.cc:390–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390void
391SNI_IpAllow::load(swoc::TextView content, swoc::TextView server_name)
392{
393 static constexpr swoc::TextView delim{",\n"};
394
395 while (!content.ltrim(delim).empty()) {
396 swoc::TextView token{content.take_prefix_at(delim)};
397 if (swoc::IPRange r; r.load(token)) {
398 Dbg(dbg_ctl_ssl_sni, "%.*s added to the ip_allow token %.*s", static_cast<int>(token.size()), token.data(),
399 int(server_name.size()), server_name.data());
400 ip_addrs.fill(r);
401 } else {
402 Dbg(dbg_ctl_ssl_sni, "%.*s is not a valid format", static_cast<int>(token.size()), token.data());
403 break;
404 }
405 }
406}
407
408int
409SNI_IpAllow::SNIAction(SSL &ssl, ActionItem::Context const & /* ctx ATS_UNUSED */) const

Callers 1

SNI_IpAllowMethod · 0.95

Calls 5

take_prefix_atMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
fillMethod · 0.45

Tested by

no test coverage detected