diff options
author | rofl0r <rofl0r@users.noreply.github.com> | 2020-09-07 16:11:51 +0100 |
---|---|---|
committer | rofl0r <rofl0r@users.noreply.github.com> | 2020-09-07 16:11:51 +0100 |
commit | 23b0c8465306a0e069a639085bb08266b803a2de (patch) | |
tree | 1766988c1a099f9697931e9d58f67ab820783089 /src/reqs.c | |
parent | 559faf7957ffed2fff3cc282426dd0f7bfa4485b (diff) |
upstream: fix ip/mask calculation for types other than none
the code wrongly processed the site_spec (here: domain) parameter
only when PT_TYPE == PT_NONE.
re-arranged code to process it correctly whenever passed.
additionally the mask is now also applied to the passed subnet/ip,
so a site_spec like 127.0.0.1/8 is converted into 127.0.0.0/8.
also the case where inet_aton fails now produces a proper error
message.
note that the code still doesn't process ipv6 addresses and mask.
to support it, we should use the existing code in acl.c and refactor
it so it can be used from both call sites.
closes #83
closes #165
Diffstat (limited to 'src/reqs.c')
0 files changed, 0 insertions, 0 deletions