Skip to content

Commit

Permalink
Merge pull request #63 from ddosify/develop
Browse files Browse the repository at this point in the history
stop parsing command complete frame on client
  • Loading branch information
fatihbaltaci authored Dec 26, 2023
2 parents 82810a8 + 6ba3392 commit 609db13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ebpf/l7_req/l7.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ int process_enter_of_syscalls_write_sendto(void* ctx, __u64 fd, __u8 is_tls, cha
req-> method = method;
}else if (parse_client_postgres_data(buf, count, &req->request_type)){
// TODO: should wait for CloseComplete message in case of statement close
if (req->request_type == POSTGRES_MESSAGE_CLOSE || req->request_type == POSTGRES_MESSAGE_TERMINATE){
if (req->request_type == POSTGRES_MESSAGE_TERMINATE){
req->protocol = PROTOCOL_POSTGRES;
req->method = METHOD_STATEMENT_CLOSE_OR_CONN_TERMINATE;
struct write_args args = {};
Expand Down
2 changes: 1 addition & 1 deletion ebpf/l7_req/postgres.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ int parse_client_postgres_data(char *buf, int buf_size, __u8 *request_type) {
// therefore specified length can exceed the buf_size
// normally (len + 1 byte of identifier == buf_size) should be true

if ((identifier == POSTGRES_MESSAGE_SIMPLE_QUERY || identifier == POSTGRES_MESSAGE_CLOSE)) {
if (identifier == POSTGRES_MESSAGE_SIMPLE_QUERY) {
*request_type = identifier;
return 1;
}
Expand Down

0 comments on commit 609db13

Please sign in to comment.