Skip to content

Commit

Permalink
- Fix #1213: Misleading error message on default access control causing
Browse files Browse the repository at this point in the history
  refuse.
  • Loading branch information
gthess committed Jan 13, 2025
1 parent 716f3df commit 62a0e03
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions daemon/acl_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ acl_interface_insert(struct acl_list* acl_interface,
struct sockaddr_storage* addr, socklen_t addrlen,
enum acl_access control)
{
return acl_find_or_create(acl_interface, addr, addrlen, control);
struct acl_addr* node = acl_find_or_create(acl_interface, addr, addrlen, control);
node->is_inteface = 1;
return node;
}

/** apply acl_tag string */
Expand Down Expand Up @@ -805,7 +807,9 @@ log_acl_action(const char* action, struct sockaddr_storage* addr,
addr_to_str(&acladdr->node.addr, acladdr->node.addrlen,
n, sizeof(n));
verbose(VERB_ALGO, "%s query from %s port %d because of "
"%s/%d %s", action, a, (int)port, n, acladdr->node.net,
"%s/%d %s%s", action, a, (int)port, n,
acladdr->node.net,
acladdr->is_inteface?"(ACL on interface IP) ":"",
acl_access_to_str(acl));
} else {
verbose(VERB_ALGO, "%s query from %s port %d", action, a,
Expand Down
2 changes: 2 additions & 0 deletions daemon/acl_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ struct acl_addr {
struct config_strlist** tag_datas;
/** size of the tag_datas array */
size_t tag_datas_size;
/* If the acl node is for an interface */
int is_inteface;
/* view element, NULL if none */
struct view* view;
};
Expand Down
4 changes: 4 additions & 0 deletions doc/Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
13 January 2025: Yorgos
- Fix #1213: Misleading error message on default access control causing
refuse.

10 January 2025: Yorgos
- Merge #1214: Use TCP_NODELAY on TLS sockets to speed up the TLS
handshake.
Expand Down

0 comments on commit 62a0e03

Please sign in to comment.