Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
c2e29ad0
Commit
c2e29ad0
authored
Aug 31, 2021
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Enforce worker-frontend-connections for QUIC
parent
9194d40d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
src/shrpx_quic_connection_handler.cc
src/shrpx_quic_connection_handler.cc
+14
-1
No files found.
src/shrpx_quic_connection_handler.cc
View file @
c2e29ad0
...
...
@@ -75,6 +75,8 @@ int QUICConnectionHandler::handle_packet(const UpstreamAddr *faddr,
return
0
;
}
auto
config
=
get_config
();
auto
dcid_key
=
make_cid_key
(
dcid
,
dcidlen
);
auto
conn_handler
=
worker_
->
get_connection_handler
();
...
...
@@ -100,6 +102,17 @@ int QUICConnectionHandler::handle_packet(const UpstreamAddr *faddr,
// new connection
auto
&
upstreamconf
=
config
->
conn
.
upstream
;
if
(
worker_
->
get_worker_stat
()
->
num_connections
>=
upstreamconf
.
worker_connections
)
{
if
(
LOG_ENABLED
(
INFO
))
{
LOG
(
INFO
)
<<
"Too many connections >="
<<
upstreamconf
.
worker_connections
;
}
return
0
;
}
ngtcp2_pkt_hd
hd
;
ngtcp2_cid
odcid
,
*
podcid
=
nullptr
;
const
uint8_t
*
token
=
nullptr
;
...
...
@@ -164,7 +177,7 @@ int QUICConnectionHandler::handle_packet(const UpstreamAddr *faddr,
remote_addr
,
local_addr
);
return
0
;
default:
if
(
!
get_config
()
->
single_thread
&&
!
(
data
[
0
]
&
0x80
)
&&
if
(
!
config
->
single_thread
&&
!
(
data
[
0
]
&
0x80
)
&&
dcidlen
>
SHRPX_QUIC_CID_PREFIXLEN
&&
!
std
::
equal
(
dcid
,
dcid
+
SHRPX_QUIC_CID_PREFIXLEN
,
worker_
->
get_cid_prefix
()))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment