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
056b735a
Commit
056b735a
authored
4 years ago
by
Deon George
Browse files
Options
Downloads
Patches
Plain Diff
Increase hapstr to 128, and define macros for haproxy binary connections.
Updates for sbbs/sbbs!11
parent
8ee80da6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sbbs3/haproxy.h
+36
-0
36 additions, 0 deletions
src/sbbs3/haproxy.h
src/sbbs3/main.cpp
+4
-3
4 additions, 3 deletions
src/sbbs3/main.cpp
with
40 additions
and
3 deletions
src/sbbs3/haproxy.h
0 → 100644
+
36
−
0
View file @
056b735a
/* haproxy.h */
/* HAPROXY PROTOCOL constant definitions */
/****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* See the GNU General Public License for more details: gpl.txt or *
* http://www.fsf.org/copyleft/gpl.html *
* *
* Anonymous FTP access to the most recent released source is available at *
* ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net *
* *
* Anonymous CVS access to the development source and modification history *
* is available at cvs.synchro.net:/cvsroot/sbbs, example: *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login *
* (just hit return, no password is necessary) *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src *
* *
* For Synchronet coding style and modification guidelines, see *
* http://www.synchro.net/source.html *
* *
* You are encouraged to submit any modifications (preferably in Unix diff *
* format) via e-mail to mods@synchro.net *
* *
* Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/
/* HAPROXY PROTO BINARY DEFINITIONS */
#define HAPROXY_AFINET 0x1
/* IPv4 Connection */
#define HAPROXY_AFINET6 0x2
/* IPv6 Connection */
This diff is collapsed.
Click to expand it.
src/sbbs3/main.cpp
+
4
−
3
View file @
056b735a
...
...
@@ -42,6 +42,7 @@
#include
"js_rtpool.h"
#include
"js_request.h"
#include
"ssl.h"
#include
"haproxy.h"
#include
<multisock.h>
#include
<limits.h>
// HOST_NAME_MAX
...
...
@@ -4986,7 +4987,7 @@ static void cleanup(int code)
void
DLLCALL
bbs_thread
(
void
*
arg
)
{
struct
addrinfo
*
res
;
unsigned
char
hapstr
[
1
0
8
];
unsigned
char
hapstr
[
1
2
8
];
char
host_name
[
256
];
char
*
identity
;
...
...
@@ -5626,7 +5627,7 @@ NO_SSH:
switch
(
l
)
{
// IPv4 - AF_INET
case
0x1
:
case
HAPROXY_AFINET
:
if
(
i
<
4
)
{
lprintf
(
LOG_ERR
,
"%04d * HAPROXY Something went wrong - IPv4 address length too small [%s]"
,
client_socket
,
hapstr
);
close_socket
(
client_socket
);
...
...
@@ -5643,7 +5644,7 @@ NO_SSH:
break
;
// IPv6 - AF_INET6
case
0x2
:
case
HAPROXY_AFINET6
:
if
(
i
<
16
)
{
lprintf
(
LOG_ERR
,
"%04d * HAPROXY Something went wrong - IPv6 address length too small [%s]"
,
client_socket
,
hapstr
);
close_socket
(
client_socket
);
...
...
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