- Checking of contest time (and per-contestant exceptions)
- Keeping history and pruning status files
- Remember hashes
-- multiple IP ranges per Access rule
- contest: override failed check
- contest: local history
- contest: task status cache
# Rules for accepting connections (first matching rule is used)
Access {
- # IP address range matched by this rule
+ # IP address ranges matched by this rule
IP 127.0.0.1
# Administrator access allowed (does not do anything yet)
Access {
IP 195.113.18.125
- Admin 0
- PlainText 0
- MaxConn 2
-}
-
-Access {
IP 10.10.8.0/24
Admin 0
PlainText 0
uns max_attachment_size;
uns trace_commands;
+static struct cf_section ip_node_conf = {
+ CF_TYPE(struct ip_node),
+ CF_ITEMS {
+ CF_USER("IP", PTR_TO(struct ip_node, addrmask), &ip_addrmask_type),
+ CF_END
+ }
+};
+
static struct cf_section access_conf = {
CF_TYPE(struct access_rule),
CF_ITEMS {
- CF_USER("IP", PTR_TO(struct access_rule, addrmask), &ip_addrmask_type),
+ CF_LIST("IP", PTR_TO(struct access_rule, ip_list), &ip_node_conf),
CF_UNS("Admin", PTR_TO(struct access_rule, allow_admin)),
CF_UNS("PlainText", PTR_TO(struct access_rule, plain_text)),
CF_UNS("MaxConn", PTR_TO(struct access_rule, max_conn)),
lookup_rule(u32 ip)
{
CLIST_FOR_EACH(struct access_rule *, r, access_rules)
- if (ip_addrmask_match(&r->addrmask, ip))
- return r;
+ CLIST_FOR_EACH(struct ip_node *, n, r->ip_list)
+ if (ip_addrmask_match(&n->addrmask, ip))
+ return r;
return NULL;
}