[GH-ISSUE #97] LTS 6.1.8 fails to compile against NGINX 1.23.0 #212

Closed
opened 2026-03-13 17:03:32 +03:00 by kerem · 6 comments
Owner

Originally created by @dvershinin on GitHub (Jun 22, 2022).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/97

In NGINX 1.23.0 some changes were made to the headers structure. Failing to compile the module with:

In file included from src/event/ngx_event.h:526,
                 from src/http/ngx_http_upstream.h:14,
                 from src/http/ngx_http.h:34,
                 from ngx_waf-6.1.8/inc/ngx_http_waf_module_type.h:11,
                 from ngx_waf-6.1.8/inc/ngx_http_waf_module_config.h:15,
                 from ngx_waf-6.1.8/src/ngx_http_waf_module_config.c:1:
src/event/ngx_event_udp.h:38:27: error: field 'pkt6' has incomplete type
     struct in6_pktinfo    pkt6;
                           ^~~~
Originally created by @dvershinin on GitHub (Jun 22, 2022). Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/97 In NGINX 1.23.0 some changes were made to the headers structure. Failing to compile the module with: ``` In file included from src/event/ngx_event.h:526, from src/http/ngx_http_upstream.h:14, from src/http/ngx_http.h:34, from ngx_waf-6.1.8/inc/ngx_http_waf_module_type.h:11, from ngx_waf-6.1.8/inc/ngx_http_waf_module_config.h:15, from ngx_waf-6.1.8/src/ngx_http_waf_module_config.c:1: src/event/ngx_event_udp.h:38:27: error: field 'pkt6' has incomplete type struct in6_pktinfo pkt6; ^~~~ ```
kerem 2026-03-13 17:03:32 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@hibobmaster commented on GitHub (Jun 27, 2022):

You can try current branch: https://github.com/ADD-SP/ngx_waf/pull/92
https://trac.nginx.org/nginx/ticket/2312

<!-- gh-comment-id:1166799431 --> @hibobmaster commented on GitHub (Jun 27, 2022): You can try current branch: https://github.com/ADD-SP/ngx_waf/pull/92 https://trac.nginx.org/nginx/ticket/2312
Author
Owner

@dvershinin commented on GitHub (Jun 27, 2022):

I made a pull request #99 to reorder includes in LTS, but there's another issue with NGINX 1.23.0 because there was renaming of cookies to cookie and it became a linked list in the latest NGINX. Here's how it fails:

ngx_waf/src/ngx_http_waf_module_check.c: In function ‘ngx_http_waf_handler_check_black_cookie’:
ngx_waf/src/ngx_http_waf_module_check.c:613:30: error: ‘ngx_http_headers_in_t’ {aka ‘struct <anonymous>’} has no member named ‘cookies’; did you mean ‘cookie’?
     } else if (r->headers_in.cookies.nelts != 0) {
                              ^~~~~~~
                              cookie
ngx_waf/src/ngx_http_waf_module_check.c:617:52: error: ‘ngx_http_headers_in_t’ {aka ‘struct <anonymous>’} has no member named ‘cookies’; did you mean ‘cookie’?
         ngx_table_elt_t** ppcookie = r->headers_in.cookies.elts;
                                                    ^~~~~~~
                                                    cookie
ngx_waf/src/ngx_http_waf_module_check.c:619:39: error: ‘ngx_http_headers_in_t’ {aka ‘struct <anonymous>’} has no member named ‘cookies’; did you mean ‘cookie’?
         for (i = 0; i < r->headers_in.cookies.nelts; i++, ppcookie++) {
                                       ^~~~~~~
                                       cookie
<!-- gh-comment-id:1167232700 --> @dvershinin commented on GitHub (Jun 27, 2022): I made a pull request #99 to reorder includes in LTS, but there's another issue with NGINX 1.23.0 because there was renaming of `cookies` to `cookie` and it became a linked list in the latest NGINX. Here's how it fails: ``` ngx_waf/src/ngx_http_waf_module_check.c: In function ‘ngx_http_waf_handler_check_black_cookie’: ngx_waf/src/ngx_http_waf_module_check.c:613:30: error: ‘ngx_http_headers_in_t’ {aka ‘struct <anonymous>’} has no member named ‘cookies’; did you mean ‘cookie’? } else if (r->headers_in.cookies.nelts != 0) { ^~~~~~~ cookie ngx_waf/src/ngx_http_waf_module_check.c:617:52: error: ‘ngx_http_headers_in_t’ {aka ‘struct <anonymous>’} has no member named ‘cookies’; did you mean ‘cookie’? ngx_table_elt_t** ppcookie = r->headers_in.cookies.elts; ^~~~~~~ cookie ngx_waf/src/ngx_http_waf_module_check.c:619:39: error: ‘ngx_http_headers_in_t’ {aka ‘struct <anonymous>’} has no member named ‘cookies’; did you mean ‘cookie’? for (i = 0; i < r->headers_in.cookies.nelts; i++, ppcookie++) { ^~~~~~~ cookie ```
Author
Owner

@ADD-SP commented on GitHub (Jun 27, 2022):

in progress

<!-- gh-comment-id:1167628459 --> @ADD-SP commented on GitHub (Jun 27, 2022): in progress
Author
Owner

@hibobmaster commented on GitHub (Jul 4, 2022):

@dvershinin I can confirm the maintainer has fixed the issue, you can try this hotfix branch
https://github.com/ADD-SP/ngx_waf/tree/hotfix/current

<!-- gh-comment-id:1173857433 --> @hibobmaster commented on GitHub (Jul 4, 2022): @dvershinin I can confirm the maintainer has fixed the issue, you can try this hotfix branch https://github.com/ADD-SP/ngx_waf/tree/hotfix/current
Author
Owner

@dvershinin commented on GitHub (Jul 5, 2022):

@hibobmaster if it's fixed, I need it to be tagged as a new LTS version, e.g. 6.1.9, for packaging purposes of mine...
(can't package off a branch commit, need a tag/release0.

<!-- gh-comment-id:1175561312 --> @dvershinin commented on GitHub (Jul 5, 2022): @hibobmaster if it's fixed, I need it to be tagged as a new LTS version, e.g. 6.1.9, for packaging purposes of mine... (can't package off a branch commit, need a tag/release0.
Author
Owner

@ADD-SP commented on GitHub (Jul 9, 2022):

Fixed

<!-- gh-comment-id:1179466585 --> @ADD-SP commented on GitHub (Jul 9, 2022): Fixed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ngx_waf#212
No description provided.