Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
1b66373a
Commit
1b66373a
authored
7 months ago
by
Lactozilla
Browse files
Options
Downloads
Plain Diff
Merge branch 'ban-64-bitmask' into 'next'
Ban by /64 by default instead of /128 See merge request
STJr/SRB2!2534
parents
e2da282f
4468219d
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!2534
Ban by /64 by default instead of /128
Pipeline
#6133
passed
7 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/netcode/i_tcp.c
+3
-3
3 additions, 3 deletions
src/netcode/i_tcp.c
with
3 additions
and
3 deletions
src/netcode/i_tcp.c
+
3
−
3
View file @
1b66373a
...
...
@@ -1208,7 +1208,7 @@ static boolean SOCK_Ban(INT32 node)
else
if
(
banned
[
numbans
].
any
.
sa_family
==
AF_INET6
)
{
banned
[
numbans
].
ip6
.
sin6_port
=
0
;
bannedmask
[
numbans
]
=
128
;
bannedmask
[
numbans
]
=
64
;
}
#endif
numbans
++
;
...
...
@@ -1245,7 +1245,7 @@ static boolean SOCK_SetBanAddress(const char *address, const char *mask)
bannedmask
[
numbans
]
=
(
UINT8
)
atoi
(
mask
);
#ifdef HAVE_IPV6
else
if
(
runp
->
ai_family
==
AF_INET6
)
bannedmask
[
numbans
]
=
128
;
bannedmask
[
numbans
]
=
64
;
#endif
else
bannedmask
[
numbans
]
=
32
;
...
...
@@ -1254,7 +1254,7 @@ static boolean SOCK_SetBanAddress(const char *address, const char *mask)
bannedmask
[
numbans
]
=
32
;
#ifdef HAVE_IPV6
else
if
(
bannedmask
[
numbans
]
>
128
&&
runp
->
ai_family
==
AF_INET6
)
bannedmask
[
numbans
]
=
128
;
bannedmask
[
numbans
]
=
64
;
#endif
numbans
++
;
runp
=
runp
->
ai_next
;
...
...
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