diff options
author | 2024-11-14 02:07:02 -0500 | |
---|---|---|
committer | 2024-12-05 10:01:28 +0100 | |
commit | d1716d5a44c37e5743bf6ea4e5cdbdab37727f27 (patch) | |
tree | f0acee1586e60852300c49b1eb16577a89ea01d9 /net/xfrm/xfrm_output.c | |
parent | xfrm: add mode_cbs module functionality (diff) | |
download | wireguard-linux-d1716d5a44c37e5743bf6ea4e5cdbdab37727f27.tar.xz wireguard-linux-d1716d5a44c37e5743bf6ea4e5cdbdab37727f27.zip |
xfrm: add generic iptfs defines and functionality
Define `XFRM_MODE_IPTFS` and `IPSEC_MODE_IPTFS` constants, and add these to
switch case and conditionals adjacent with the existing TUNNEL modes.
Signed-off-by: Christian Hopps <chopps@labn.net>
Tested-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm/xfrm_output.c')
-rw-r--r-- | net/xfrm/xfrm_output.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c index ef81359e4038..b5025cf6136e 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c @@ -677,6 +677,10 @@ static void xfrm_get_inner_ipproto(struct sk_buff *skb, struct xfrm_state *x) return; } + if (x->outer_mode.encap == XFRM_MODE_IPTFS) { + xo->inner_ipproto = IPPROTO_AGGFRAG; + return; + } /* non-Tunnel Mode */ if (!skb->encapsulation) |