| 88 | } |
| 89 | |
| 90 | void |
| 91 | IpAllow::startup() |
| 92 | { |
| 93 | // Should not have been initialized before |
| 94 | ink_assert(IpAllow::configid == 0); |
| 95 | |
| 96 | ipAllowUpdate = new ConfigUpdateHandler<IpAllow>(); |
| 97 | ipAllowUpdate->attach("proxy.config.cache.ip_allow.filename"); |
| 98 | ipAllowUpdate->attach("proxy.config.cache.ip_categories.filename"); |
| 99 | |
| 100 | reconfigure(); |
| 101 | |
| 102 | ConfigInfo *config = configProcessor.get(configid); |
| 103 | if (config == nullptr) { |
| 104 | configid = configProcessor.set( |
| 105 | configid, new self_type("proxy.config.cache.ip_allow.filename", "proxy.config.cache.ip_categories.filename")); |
| 106 | Warning("%s not loaded; All IP Addresses will be blocked.", ts::filename::IP_ALLOW); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | void |
| 111 | IpAllow::reconfigure() |