Depend on v7.c properly

PUBLISHED_FROM=cf49d0d345e4a7607c535f9578b8ed4160f2fccd
This commit is contained in:
Deomid Ryabkov authored and Cesanta Bot committed 2016-07-22 14:31:13 +00:00
1 parent 27986213aa
commit 6a3d01ee6b
20 files changed
+66 -66

No files matched your search

+6 -6
View File
@@ -6,22 +6,22 @@ signature: |
int mg_check_ip_acl(const char *acl, uint32_t remote_ip);
---
Verifies given IP address against the ACL.
Verify given IP address against the ACL.
`remote_ip` - an IPv4 address to check, in host byte order
`acl` - a comma separated list of IP subnets: `x.x.x.x/x` or `x.x.x.x`.
Each subnet is
prepended by either a - or a + sign. A plus sign means allow, where a
minus sign means deny. If a subnet mask is omitted, such as `-1.2.3.4`,
it means that only that single IP address is denied.
this means to deny only that single IP address.
Subnet masks may vary from 0 to 32, inclusive. The default setting
is to allow all access. On each request the full list is traversed,
is to allow all accesses. On each request the full list is traversed,
and the last match wins. Example:
`-0.0.0.0/0,+192.168/16` - deny all acccesses, only allow 192.168/16 subnet
To learn more about subnet masks, see this
link:https://en.wikipedia.org/wiki/Subnetwork[Wikipedia page on Subnetwork].
To learn more about subnet masks, see the
link:https://en.wikipedia.org/wiki/Subnetwork[Wikipedia page on Subnetwork]
Returns -1 if ACL is malformed, 0 if address is disallowed, 1 if allowed.
Return -1 if ACL is malformed, 0 if address is disallowed, 1 if allowed.