/* This file is part of Ping903 Copyright (C) 2020 Sergey Poznyakoff License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. */ #include #include #include "defs.h" int p903_httpd_acl(void *cls, const struct sockaddr *addr, socklen_t addrlen) { struct request_info req; request_init(&req, RQ_DAEMON, progname, RQ_CLIENT_SIN, addr, RQ_SERVER_SIN, cls, NULL); sock_methods(&req); return hosts_access(&req) ? MHD_YES : MHD_NO; }