struct access_info *ai, *tmp;
struct in_addr to_delete;
+ PARA_NOTICE_LOG("removing entries matching %s/%u\n", addr, netmask);
inet_pton(AF_INET, addr, &to_delete);
list_for_each_entry_safe(ai, tmp, acl, node) {
-
if (v4_addr_match(to_delete.s_addr, ai->addr.s_addr,
PARA_MIN(netmask, ai->netmask))) {
- PARA_NOTICE_LOG("removing %s/%u from access list\n",
- addr, ai->netmask);
+ char dst[INET_ADDRSTRLEN + 1];
+ const char *p = inet_ntop(AF_INET, &ai->addr.s_addr,
+ dst, sizeof(dst));
+ if (p)
+ PARA_INFO_LOG("removing %s/%u\n", p,
+ ai->netmask);
list_del(&ai->node);
free(ai);
}