Commit 4e4362d2 authored by Ulrich Weber's avatar Ulrich Weber Committed by Steffen Klassert

xfrm: support output_mark for offload ESP packets

Commit 9b42c1f1 ("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: 9b42c1f1 ("xfrm: Extend the output_mark to support input direction and masking.")
Signed-off-by: default avatarUlrich Weber <ulrich.weber@gmail.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent 8aaea2b0
...@@ -57,6 +57,8 @@ static struct sk_buff *esp4_gro_receive(struct list_head *head, ...@@ -57,6 +57,8 @@ static struct sk_buff *esp4_gro_receive(struct list_head *head,
if (!x) if (!x)
goto out_reset; goto out_reset;
skb->mark = xfrm_smark_get(skb->mark, x);
sp->xvec[sp->len++] = x; sp->xvec[sp->len++] = x;
sp->olen++; sp->olen++;
......
...@@ -79,6 +79,8 @@ static struct sk_buff *esp6_gro_receive(struct list_head *head, ...@@ -79,6 +79,8 @@ static struct sk_buff *esp6_gro_receive(struct list_head *head,
if (!x) if (!x)
goto out_reset; goto out_reset;
skb->mark = xfrm_smark_get(skb->mark, x);
sp->xvec[sp->len++] = x; sp->xvec[sp->len++] = x;
sp->olen++; sp->olen++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment