diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-07-23 01:50:32 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-07-26 23:38:51 +0200 |
commit | 8b3c59a7a0bed6fe365755ac211dcf94fdac81b4 (patch) | |
tree | 2bca7e181b055cafad8f87c47d68784dc8ab87e8 /net/tls/tls_strp.c | |
parent | tcp: allow tls to decrypt directly from the tcp rcv queue (diff) | |
download | linux-8b3c59a7a0bed6fe365755ac211dcf94fdac81b4.tar.xz linux-8b3c59a7a0bed6fe365755ac211dcf94fdac81b4.zip |
tls: rx: device: add input CoW helper
Wrap the remaining skb_cow_data() into a helper, so it's easier
to replace down the lane. The new version will change the skb
so make sure relevant pointers get reloaded after the call.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tls/tls_strp.c')
-rw-r--r-- | net/tls/tls_strp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/tls/tls_strp.c b/net/tls/tls_strp.c index 40b177366121..d9bb4f23f01a 100644 --- a/net/tls/tls_strp.c +++ b/net/tls/tls_strp.c @@ -13,6 +13,17 @@ struct sk_buff *tls_strp_msg_detach(struct tls_sw_context_rx *ctx) return skb; } +int tls_strp_msg_cow(struct tls_sw_context_rx *ctx) +{ + struct sk_buff *unused; + int nsg; + + nsg = skb_cow_data(ctx->recv_pkt, 0, &unused); + if (nsg < 0) + return nsg; + return 0; +} + int tls_strp_msg_hold(struct sock *sk, struct sk_buff *skb, struct sk_buff_head *dst) { |