quic: do not update crypto keys from workers 22/33322/2
authorAloys Augustin <aloaugus@cisco.com>
Mon, 2 Aug 2021 15:42:23 +0000 (17:42 +0200)
committerFlorin Coras <florin.coras@gmail.com>
Tue, 3 Aug 2021 17:09:18 +0000 (17:09 +0000)
commit7dbc8ebe54f4ddb83e337be152e9b8405f52e577
tree3f11b93e346f7f4a686ada3448296e69f0d35fdb
parent8f174ad5b6ab472d7ee4cba61bc5f672bd6a3fbb
quic: do not update crypto keys from workers

The vnet_crypto_key_add should only be called from the main thread.
This patch works around this limitation by allocating one key per worker
and updating it on the fly everytime we need to do a crypto operation.

This solution is far from ideal, but quicly has a strong assumption that
it can use a key immediately after determining it, so making the key
creation asynchronous is not a possibility.

Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Change-Id: I19fc5814195156003c36a73bb616738ba9d828f7
Type: fix
src/plugins/quic/quic.c
src/plugins/quic/quic.h
src/plugins/quic/quic_crypto.c