| 927 | return false; |
| 928 | } |
| 929 | static void |
| 930 | parseIpMap(config_t *config, swoc::TextView txt) |
| 931 | { |
| 932 | // sent null ipstring, fill with default open IPs |
| 933 | if (txt.empty()) { |
| 934 | config->addrs.fill(DEFAULT_IP6); |
| 935 | config->addrs.fill(DEFAULT_IP); |
| 936 | Dbg(dbg_ctl, "Empty allow settings, setting all IPs in allow list"); |
| 937 | return; |
| 938 | } |
| 939 | |
| 940 | while (txt) { |
| 941 | auto token{txt.take_prefix_at(',')}; |
| 942 | if (swoc::IPRange r; r.load(token)) { |
| 943 | config->addrs.fill(r); |
| 944 | Dbg(dbg_ctl, "Added %.*s to allow ip list", int(token.length()), token.data()); |
| 945 | } |
| 946 | } |
| 947 | } |
| 948 | |
| 949 | static config_t * |
| 950 | new_config(std::fstream &fh) |
no test coverage detected