xfrm: support output_mark for offload ESP packets
Subsystems (3)
PATCH 1/1 xfrm: support output_mark for offload ESP packets
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.
--- net/ipv4/esp4_offload.c | 2 ++ net/ipv6/esp6_offload.c | 2 ++ 2 files changed, 4 insertions(+)
net/ipv4/esp4_offload.c +2 -0
@@ -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++;
net/ipv6/esp6_offload.c +2 -0
@@ -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++;
Signature · 1 line
2.20.1
Steffen Klassert
maintainerQuoted 8 lines · Ulrich Weber
Commit
9b42c1f179a6("xfrm: Extend theoutput_mark") addedoutput_marksupport but missed ESP offload support.
xfrm_smark_get()is not called withinxfrm_input()for packets coming fromesp4_gro_receive()oresp6_gro_receive(). Therefore callxfrm_smark_get()directly within these functions.Signed-off-by Ulrich Weber <[email protected]>
Can you please add a 'Fixes' tag, so that it can be properly backported to the -stable trees.
Thanks!
PATCH v2 1/1 xfrm: support output_mark for offload ESP packets
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.
--- net/ipv4/esp4_offload.c | 2 ++ net/ipv6/esp6_offload.c | 2 ++ 2 files changed, 4 insertions(+)
net/ipv4/esp4_offload.c +2 -0
@@ -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++;
net/ipv6/esp6_offload.c +2 -0
@@ -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++;
Signature · 1 line
2.20.1
Quoted 9 lines · Ulrich Weber
Commit
9b42c1f179a6("xfrm: Extend theoutput_mark") addedoutput_marksupport but missed ESP offload support.
xfrm_smark_get()is not called withinxfrm_input()for packets coming fromesp4_gro_receive()oresp6_gro_receive(). Therefore callxfrm_smark_get()directly within these functions.Fixes 9b42c1f179a6 ("xfrm: Extend the output_mark to support input direction and masking.")Signed-off-by Ulrich Weber <[email protected]>
Applied, thanks Ulrich!