diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2024-03-29 03:30:13 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2024-03-29 03:30:13 +0100 |
| commit | 543ab73017b83e251924caca9aa37a0f892fe05f (patch) | |
| tree | 7b58b9b4e1e7f05db81f25b50e062fb5ff36c421 /ot_http.c | |
| parent | ede702c7ffc90f1635c069d20c8a46b0b2a6ab66 (diff) | |
Allow networks to be used instead of ip addresses when blessing is involved
Diffstat (limited to 'ot_http.c')
| -rw-r--r-- | ot_http.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -215,7 +215,7 @@ static const ot_keywords keywords_format[] = | |||
| 215 | #ifdef WANT_RESTRICT_STATS | 215 | #ifdef WANT_RESTRICT_STATS |
| 216 | struct http_data *cookie = io_getcookie( sock ); | 216 | struct http_data *cookie = io_getcookie( sock ); |
| 217 | 217 | ||
| 218 | if( !cookie || !accesslist_isblessed( cookie->ip, OT_PERMISSION_MAY_STAT ) ) | 218 | if( !cookie || !accesslist_is_blessed( cookie->ip, OT_PERMISSION_MAY_STAT ) ) |
| 219 | HTTPERROR_403_IP; | 219 | HTTPERROR_403_IP; |
| 220 | #endif | 220 | #endif |
| 221 | 221 | ||
| @@ -417,7 +417,7 @@ static ssize_t http_handle_announce( const int64 sock, struct ot_workstruct *ws, | |||
| 417 | } | 417 | } |
| 418 | 418 | ||
| 419 | #ifdef WANT_IP_FROM_PROXY | 419 | #ifdef WANT_IP_FROM_PROXY |
| 420 | if( accesslist_isblessed( cookie->ip, OT_PERMISSION_MAY_PROXY ) ) { | 420 | if( accesslist_is_blessed( cookie->ip, OT_PERMISSION_MAY_PROXY ) ) { |
| 421 | ot_ip6 proxied_ip; | 421 | ot_ip6 proxied_ip; |
| 422 | char *fwd = http_header( ws->request, ws->header_size, "x-forwarded-for" ); | 422 | char *fwd = http_header( ws->request, ws->header_size, "x-forwarded-for" ); |
| 423 | if( fwd && scan_ip6( fwd, proxied_ip ) ) | 423 | if( fwd && scan_ip6( fwd, proxied_ip ) ) |
| @@ -495,7 +495,7 @@ static ssize_t http_handle_announce( const int64 sock, struct ot_workstruct *ws, | |||
| 495 | #ifdef WANT_FULLLOG_NETWORKS | 495 | #ifdef WANT_FULLLOG_NETWORKS |
| 496 | case 8: /* matched "lognet" */ | 496 | case 8: /* matched "lognet" */ |
| 497 | { | 497 | { |
| 498 | //if( accesslist_isblessed( cookie->ip, OT_PERMISSION_MAY_STAT ) ) { | 498 | //if( accesslist_is_blessed( cookie->ip, OT_PERMISSION_MAY_STAT ) ) { |
| 499 | char *tmp_buf = ws->reply; | 499 | char *tmp_buf = ws->reply; |
| 500 | ot_net net; | 500 | ot_net net; |
| 501 | signed short parsed, bits; | 501 | signed short parsed, bits; |
