]> git.baikalelectronics.ru Git - kernel.git/commitdiff
xfrm: support output_mark for offload ESP packets
authorUlrich Weber <ulrich.weber@gmail.com>
Wed, 15 Jan 2020 11:11:29 +0000 (12:11 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 15 Jan 2020 11:18:35 +0000 (12:18 +0100)
Commit 9b42c1f179a6 ("xfrm: Extend the output_mark") added output_mark
support but missed ESP offload support.

xfrm_smark_get() is not called within xfrm_input() for packets coming
from esp4_gro_receive() or esp6_gro_receive(). Therefore call
xfrm_smark_get() directly within these functions.

Fixes: 9b42c1f179a6 ("xfrm: Extend the output_mark to support input direction and masking.")
Signed-off-by: Ulrich Weber <ulrich.weber@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/ipv4/esp4_offload.c
net/ipv6/esp6_offload.c

index 0e4a7cf6bc87d2b026d32172f6fbebc673548f90..e2e219c7854a058712c982d8f995b08d3bdb5776 100644 (file)
@@ -57,6 +57,8 @@ static struct sk_buff *esp4_gro_receive(struct list_head *head,
                if (!x)
                        goto out_reset;
 
+               skb->mark = xfrm_smark_get(skb->mark, x);
+
                sp->xvec[sp->len++] = x;
                sp->olen++;
 
index e31626ffccd18ef2b1a7303ab1c1ef2ef38e9d51..fd535053245b616eca675e65c89bed679fe796a8 100644 (file)
@@ -79,6 +79,8 @@ static struct sk_buff *esp6_gro_receive(struct list_head *head,
                if (!x)
                        goto out_reset;
 
+               skb->mark = xfrm_smark_get(skb->mark, x);
+
                sp->xvec[sp->len++] = x;
                sp->olen++;