Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 1 | From 7f724bbafbb1e170401dd5de201273ab8c8bc75f Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sun, 28 Aug 2022 14:24:02 -0700 |
| 4 | Subject: [PATCH] fastcgi: Use value instead of address of sin6_port |
| 5 | |
| 6 | This seems to be wrongly assigned where ipv4 sin_port is |
| 7 | equated to address of sin6_port and not value of sin6_port |
| 8 | |
| 9 | Upstream-Status: Submitted [https://github.com/monkey/monkey/pull/375] |
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 11 | --- |
| 12 | plugins/fastcgi/fcgi_handler.c | 2 +- |
| 13 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 14 | |
| 15 | diff --git a/plugins/fastcgi/fcgi_handler.c b/plugins/fastcgi/fcgi_handler.c |
| 16 | index 9e095e3c..e8e1eec1 100644 |
| 17 | --- a/plugins/fastcgi/fcgi_handler.c |
| 18 | +++ b/plugins/fastcgi/fcgi_handler.c |
| 19 | @@ -245,7 +245,7 @@ static inline int fcgi_add_param_net(struct fcgi_handler *handler) |
| 20 | struct sockaddr_in *s4 = (struct sockaddr_in *)&addr4; |
| 21 | memset(&addr4, 0, sizeof(addr4)); |
| 22 | addr4.sin_family = AF_INET; |
| 23 | - addr4.sin_port = &s->sin6_port; |
| 24 | + addr4.sin_port = s->sin6_port; |
| 25 | memcpy(&addr4.sin_addr.s_addr, |
| 26 | s->sin6_addr.s6_addr + 12, |
| 27 | sizeof(addr4.sin_addr.s_addr)); |
| 28 | -- |
| 29 | 2.37.2 |
| 30 | |