From 543ab73017b83e251924caca9aa37a0f892fe05f Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Fri, 29 Mar 2024 03:30:13 +0100 Subject: Allow networks to be used instead of ip addresses when blessing is involved --- ot_http.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ot_http.c') diff --git a/ot_http.c b/ot_http.c index 90b7a4b..35f88b1 100644 --- a/ot_http.c +++ b/ot_http.c @@ -215,7 +215,7 @@ static const ot_keywords keywords_format[] = #ifdef WANT_RESTRICT_STATS struct http_data *cookie = io_getcookie( sock ); - if( !cookie || !accesslist_isblessed( cookie->ip, OT_PERMISSION_MAY_STAT ) ) + if( !cookie || !accesslist_is_blessed( cookie->ip, OT_PERMISSION_MAY_STAT ) ) HTTPERROR_403_IP; #endif @@ -417,7 +417,7 @@ static ssize_t http_handle_announce( const int64 sock, struct ot_workstruct *ws, } #ifdef WANT_IP_FROM_PROXY - if( accesslist_isblessed( cookie->ip, OT_PERMISSION_MAY_PROXY ) ) { + if( accesslist_is_blessed( cookie->ip, OT_PERMISSION_MAY_PROXY ) ) { ot_ip6 proxied_ip; char *fwd = http_header( ws->request, ws->header_size, "x-forwarded-for" ); if( fwd && scan_ip6( fwd, proxied_ip ) ) @@ -495,7 +495,7 @@ static ssize_t http_handle_announce( const int64 sock, struct ot_workstruct *ws, #ifdef WANT_FULLLOG_NETWORKS case 8: /* matched "lognet" */ { - //if( accesslist_isblessed( cookie->ip, OT_PERMISSION_MAY_STAT ) ) { + //if( accesslist_is_blessed( cookie->ip, OT_PERMISSION_MAY_STAT ) ) { char *tmp_buf = ws->reply; ot_net net; signed short parsed, bits; -- cgit v1.2.3