Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
socket: fixes around camblet_get/setsockopt and recvmsg waiting and o…
Browse files Browse the repository at this point in the history
…ther things (#209)

* socket: save and restore original tcp_getsocktopts

* setsockopt memory corruption fix

* remove unused variable

* add sockopt.c test program

* fix close and connect errors

* add missing proto for tests

* file-server: add logger middleware

* add some logs to sockopt

* introduce manual_mode and add ALPN fix

* fix socket read CPU hog and add signal check

* socokopt.c updates

* extend sockopt and file-server with server_name check

* fix waits

* add sockopt test case

* smoke test is not only proxy-wasm anymore

* test getsockopt

* change base workflow name

* sockopt: add proper error handling for all situations

* rename user facing type

* wait for data after all flushes

* address comments

* Update test/sockopt.c

Co-authored-by: Balint Molnar <[email protected]>

---------

Co-authored-by: Balint Molnar <[email protected]>
  • Loading branch information
bonifaido and baluchicken authored Apr 15, 2024
1 parent 4666c87 commit be5041f
Show file tree
Hide file tree
Showing 7 changed files with 259 additions and 64 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Makefile CI
name: Build and test

on:
push:
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow
# limit-access-to-actor: true

- name: Run proxy-wasm smoke test with kTLS
- name: Run smoke test with kTLS
uses: ./camblet-driver/.github/actions/smoketest
timeout-minutes: 1

Expand All @@ -94,6 +94,6 @@ jobs:
sudo modprobe camblet dyndbg==_ ktls_available=0
sudo dmesg -T
- name: Run proxy-wasm smoke test with bearSSL
- name: Run smoke test with bearSSL
uses: ./camblet-driver/.github/actions/smoketest
timeout-minutes: 1
4 changes: 3 additions & 1 deletion include/camblet.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
#ifndef camblet_h
#define camblet_h


#define SOL_CAMBLET 7891
#define CAMBLET_HOSTNAME 1
#define CAMBLET_TLS_INFO 2
#define CAMBLET "camblet"

#define CAMBLET_EINVALIDSPIFFEID 1001

Expand All @@ -23,6 +25,6 @@ typedef struct
bool mtls_enabled;
char spiffe_id[256];
char peer_spiffe_id[256];
} tls_info;
} camblet_tls_info;

#endif /* camblet_h */
1 change: 0 additions & 1 deletion src/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ static LIST_HEAD(command_list);

// lock for the above list to make it thread safe
static DEFINE_MUTEX(command_list_lock);
static unsigned long command_list_lock_flags;

// wait queue for the driver to be woken up when a command is added to the list
static DECLARE_WAIT_QUEUE_HEAD(command_wait_queue);
Expand Down
Loading

0 comments on commit be5041f

Please sign in to comment.