Skip to content

Commit

Permalink
xfrm: support output_mark for offload ESP packets
Browse files Browse the repository at this point in the history
Commit 9b42c1f ("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: 9b42c1f ("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>
  • Loading branch information
Ulrich Weber authored and Steffen Klassert committed Jan 15, 2020
1 parent 8aaea2b commit 4e4362d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/ipv4/esp4_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;

Expand Down
2 changes: 2 additions & 0 deletions net/ipv6/esp6_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;

Expand Down

0 comments on commit 4e4362d

Please sign in to comment.