-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace GFSM calls with direct calls to TLS and HTTP handlers on
low level networking layers. GFSM was designed to build graphs of network protocols FSMs (this design was inspired by FreeBSD netgraph). However, during the years neither we nor external users have any requirements to introduce any modules which use GFSM to hook TLS or HTTP entry code. There are only 2 users of the mechanism for TLS and HTTP for now: 1. TLS -> HTTP protocols handling 2. HTTP limits (the frang module) This patch replaces GFSM calls with direct calls to tfw_http_req_process(), tfw_tls_msg_process() and frang_tls_handler() in following paths: 1. sync sockets -> TLS 2. sync sockets -> HTTP 3. TLS -> HTTP 4. TLS -> Frang As the result the function tfw_connection_recv() was eliminated. Now the code is simpler and has lower overhead. We still might need GFSM for the user-space requests handling (#77) and Tempesta Language (#102).
- Loading branch information
1 parent
27e65ef
commit 2eae1da
Showing
13 changed files
with
79 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Tempesta FW | ||
* | ||
* Copyright (C) 2014 NatSys Lab. ([email protected]). | ||
* Copyright (C) 2015-2018 Tempesta Technologies, Inc. | ||
* Copyright (C) 2015-2021 Tempesta Technologies, Inc. | ||
* | ||
* 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 | ||
|
@@ -88,7 +88,6 @@ enum { | |
/* Security rules enforcement. */ | ||
TFW_FSM_FRANG_REQ, | ||
TFW_FSM_FRANG_RESP, | ||
TFW_FSM_FRANG_TLS, | ||
|
||
TFW_FSM_NUM /* Must be <= TFW_GFSM_FSM_N */ | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Tempesta FW | ||
* | ||
* Copyright (C) 2014 NatSys Lab. ([email protected]). | ||
* Copyright (C) 2015-2020 Tempesta Technologies, Inc. | ||
* Copyright (C) 2015-2021 Tempesta Technologies, Inc. | ||
* | ||
* 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 | ||
|
@@ -24,6 +24,7 @@ | |
#include <linux/in6.h> | ||
#include <net/sock.h> | ||
#include <net/tcp.h> | ||
#include <net/tls_hs.h> | ||
|
||
#include "tempesta_fw.h" | ||
#include "connection.h" | ||
|
@@ -238,4 +239,6 @@ struct frang_vhost_cfg_t { | |
bool http_method_override; | ||
}; | ||
|
||
int frang_tls_handler(TlsCtx *tls, int state); | ||
|
||
#endif /* __HTTP_LIMITS__ */ |
Oops, something went wrong.