]> asedeno.scripts.mit.edu Git - linux.git/commit
net/tls: fully initialize the msg wrapper skb
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 3 Jun 2019 22:16:58 +0000 (15:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Jun 2019 21:33:50 +0000 (14:33 -0700)
commitda29e4b466e6916a52e0e2f60054f855c324a9c2
tree920af641fcecb8ac9956ded01c33df742c917add
parent7e7d199e05f80735864efcb5b306fefd98039a58
net/tls: fully initialize the msg wrapper skb

If strparser gets cornered into starting a new message from
an sk_buff which already has frags, it will allocate a new
skb to become the "wrapper" around the fragments of the
message.

This new skb does not inherit any metadata fields.  In case
of TLS offload this may lead to unnecessarily re-encrypting
the message, as skb->decrypted is not set for the wrapper skb.

Try to be conservative and copy all fields of old skb
strparser's user may reasonably need.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
net/core/skbuff.c
net/strparser/strparser.c