Re: [PATCH net-next v6 12/25] ovpn: implement packet processing
From: Antonio Quartulli <antonio@openvpn.net>
Date: 2024-09-09 08:36:40
On 06/09/2024 21:29, Simon Horman wrote:
On Tue, Aug 27, 2024 at 02:07:52PM +0200, Antonio Quartulli wrote:quoted
This change implements encryption/decryption and encapsulation/decapsulation of OpenVPN packets. Support for generic crypto state is added along with a wrapper for the AEAD crypto kernel API. Signed-off-by: Antonio Quartulli <antonio@openvpn.net>...quoted
diff --git a/drivers/net/ovpn/io.c b/drivers/net/ovpn/io.c...quoted
@@ -54,39 +56,122 @@ static void ovpn_netdev_write(struct ovpn_peer *peer, struct sk_buff *skb) dev_sw_netstats_rx_add(peer->ovpn->dev, skb->len); } -static void ovpn_decrypt_post(struct sk_buff *skb, int ret) +void ovpn_decrypt_post(struct sk_buff *skb, int ret) { - struct ovpn_peer *peer = ovpn_skb_cb(skb)->peer; + struct ovpn_crypto_key_slot *ks = ovpn_skb_cb(skb)->ctx->ks; + struct ovpn_peer *peer = ovpn_skb_cb(skb)->ctx->peer; + __be16 proto; + __be32 *pid; - if (unlikely(ret < 0)) + /* crypto is happening asyncronously. this function will be callednit: asynchronously Flagged by checkpatch.pl --codespell
Thanks! I forgot to add the codespell flag to my last checkpatch run :-( Will fix it in the next version. Cheers,
quoted
+ * again later by the crypto callback with a proper return code + */ + if (unlikely(ret == -EINPROGRESS)) + return;...
-- Antonio Quartulli OpenVPN Inc.