summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/monkey/files/0001-fastcgi-Use-value-instead-of-address-of-sin6_port.patch
blob: 6bc02508779b4317465d920072f68731b544f054 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 7f724bbafbb1e170401dd5de201273ab8c8bc75f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 28 Aug 2022 14:24:02 -0700
Subject: [PATCH] fastcgi: Use value instead of address of sin6_port

This seems to be wrongly assigned where ipv4 sin_port is
equated to address of sin6_port and not value of sin6_port

Upstream-Status: Submitted [https://github.com/monkey/monkey/pull/375]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 plugins/fastcgi/fcgi_handler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/plugins/fastcgi/fcgi_handler.c
+++ b/plugins/fastcgi/fcgi_handler.c
@@ -247,7 +247,7 @@ static inline int fcgi_add_param_net(str
             struct sockaddr_in *s4 = (struct sockaddr_in *)&addr4;
             memset(&addr4, 0, sizeof(addr4));
             addr4.sin_family = AF_INET;
-            addr4.sin_port = &s->sin6_port;
+            addr4.sin_port = s->sin6_port;
             memcpy(&addr4.sin_addr.s_addr,
                    s->sin6_addr.s6_addr + 12,
                    sizeof(addr4.sin_addr.s_addr));