mirror of
https://github.com/bol-van/zapret.git
synced 2024-12-27 11:50:34 +05:00
tpws: unify pools.c with nfqws
This commit is contained in:
parent
acfd844a49
commit
daac1d2127
@ -481,3 +481,9 @@ bool port_filters_in_range(const struct port_filters_head *head, uint16_t port)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool port_filters_deny_if_empty(struct port_filters_head *head)
|
||||
{
|
||||
port_filter pf;
|
||||
if (LIST_FIRST(head)) return true;
|
||||
return pf_parse("0",&pf) && port_filter_add(head,&pf);
|
||||
}
|
||||
|
@ -140,3 +140,4 @@ LIST_HEAD(port_filters_head, port_filter_item);
|
||||
bool port_filter_add(struct port_filters_head *head, const port_filter *pf);
|
||||
void port_filters_destroy(struct port_filters_head *head);
|
||||
bool port_filters_in_range(const struct port_filters_head *head, uint16_t port);
|
||||
bool port_filters_deny_if_empty(struct port_filters_head *head);
|
||||
|
Loading…
Reference in New Issue
Block a user