Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
a2d07ef9
Commit
a2d07ef9
authored
Jul 22, 2016
by
Evelyn
Committed by
GitHub
Jul 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update mg_check_ip_acl.md
parent
3cf4e32d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
mg_check_ip_acl.md
docs/c-api/net.h/mg_check_ip_acl.md
+5
-5
No files found.
docs/c-api/net.h/mg_check_ip_acl.md
View file @
a2d07ef9
...
...
@@ -6,7 +6,7 @@ signature: |
int mg_check_ip_acl(const char *acl, uint32_t remote_ip);
---
Verif
y
given IP address against the ACL.
Verif
ies
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`
.
...
...
@@ -15,13 +15,13 @@ 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`
,
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
es
. On each request the full list is traversed,
is to allow all access. 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 th
e
link:https://en.wikipedia.org/wiki/Subnetwork
[
Wikipedia page on Subnetwork
]
To learn more about subnet masks, see th
is
link:https://en.wikipedia.org/wiki/Subnetwork
[
Wikipedia page on Subnetwork
]
.
Return -1 if ACL is malformed, 0 if address is disallowed, 1 if allowed.
Return
s
-1 if ACL is malformed, 0 if address is disallowed, 1 if allowed.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment