Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
60e1e6c3
Commit
60e1e6c3
authored
4 years ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Disable HAProxy support by default for now"
This reverts commit
67d64417
.
parent
b3a0377e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!463
MRC mods by Codefenix (2024-10-20)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/xpdev/multisock.c
+7
-10
7 additions, 10 deletions
src/xpdev/multisock.c
with
7 additions
and
10 deletions
src/xpdev/multisock.c
+
7
−
10
View file @
60e1e6c3
...
@@ -330,6 +330,11 @@ SOCKET DLLCALL xpms_accept(struct xpms_set *xpms_set, union xp_sockaddr * addr,
...
@@ -330,6 +330,11 @@ SOCKET DLLCALL xpms_accept(struct xpms_set *xpms_set, union xp_sockaddr * addr,
struct
timeval
*
tvp
;
struct
timeval
*
tvp
;
SOCKET
max_sock
=
0
;
SOCKET
max_sock
=
0
;
SOCKET
ret
;
SOCKET
ret
;
char
hapstr
[
128
];
char
haphex
[
256
];
char
*
p
,
*
tok
;
long
l
;
void
*
vp
;
FD_ZERO
(
&
read_fs
);
FD_ZERO
(
&
read_fs
);
for
(
i
=
0
;
i
<
xpms_set
->
sock_count
;
i
++
)
{
for
(
i
=
0
;
i
<
xpms_set
->
sock_count
;
i
++
)
{
...
@@ -362,16 +367,10 @@ SOCKET DLLCALL xpms_accept(struct xpms_set *xpms_set, union xp_sockaddr * addr,
...
@@ -362,16 +367,10 @@ SOCKET DLLCALL xpms_accept(struct xpms_set *xpms_set, union xp_sockaddr * addr,
ret
=
accept
(
xpms_set
->
socks
[
i
].
sock
,
&
addr
->
addr
,
addrlen
);
ret
=
accept
(
xpms_set
->
socks
[
i
].
sock
,
&
addr
->
addr
,
addrlen
);
if
(
ret
==
INVALID_SOCKET
)
if
(
ret
==
INVALID_SOCKET
)
return
ret
;
return
ret
;
#if defined(HAPROXY_SUPPORT)
// Set host_ip from haproxy protocol, if its used
// Set host_ip from haproxy protocol, if its used
// http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
// http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
if
(
flags
&
XPMS_ACCEPT_FLAG_HAPROXY
)
{
if
(
flags
&
XPMS_ACCEPT_FLAG_HAPROXY
)
{
char
hapstr
[
128
];
char
haphex
[
256
];
char
*
p
,
*
tok
;
long
l
;
void
*
vp
;
memset
(
addr
,
0
,
sizeof
(
*
addr
));
memset
(
addr
,
0
,
sizeof
(
*
addr
));
xpms_set
->
lprintf
(
LOG_DEBUG
,
"%04d Working out client address from HAProxy PROTO"
,
ret
);
xpms_set
->
lprintf
(
LOG_DEBUG
,
"%04d Working out client address from HAProxy PROTO"
,
ret
);
...
@@ -583,9 +582,7 @@ SOCKET DLLCALL xpms_accept(struct xpms_set *xpms_set, union xp_sockaddr * addr,
...
@@ -583,9 +582,7 @@ SOCKET DLLCALL xpms_accept(struct xpms_set *xpms_set, union xp_sockaddr * addr,
xpms_set
->
lprintf
(
LOG_INFO
,
"%04d * HAPROXY Source [%s]"
,
ret
,
hapstr
);
xpms_set
->
lprintf
(
LOG_INFO
,
"%04d * HAPROXY Source [%s]"
,
ret
,
hapstr
);
return
ret
;
return
ret
;
}
else
}
else
{
#endif
/* HAPPROX_SUPPORT - currently doesn't work on WinXP */
{
return
ret
;
return
ret
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment