aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_interface_core.c
diff options
context:
space:
mode:
authorSteffen Klassert <[email protected]>2025-01-16 10:46:03 +0000
committerSteffen Klassert <[email protected]>2025-01-20 06:06:53 +0000
commit1620c88887b16940e00dbe57dd38c74eda9bad9e (patch)
treea89dd9304fb7af4c757a55b210f8dab36b418f44 /net/xfrm/xfrm_interface_core.c
parentxfrm: delete intermediate secpath entry in packet offload mode (diff)
downloadkernel-1620c88887b16940e00dbe57dd38c74eda9bad9e.tar.gz
kernel-1620c88887b16940e00dbe57dd38c74eda9bad9e.zip
xfrm: Fix the usage of skb->sk
xfrm assumed to always have a full socket at skb->sk. This is not always true, so fix it by converting to a full socket before it is used. Signed-off-by: Steffen Klassert <[email protected]> Reviewed-by: Eric Dumazet <[email protected]>
Diffstat (limited to 'net/xfrm/xfrm_interface_core.c')
-rw-r--r--net/xfrm/xfrm_interface_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_interface_core.c b/net/xfrm/xfrm_interface_core.c
index 98f1e2b67c76..c397eb99d867 100644
--- a/net/xfrm/xfrm_interface_core.c
+++ b/net/xfrm/xfrm_interface_core.c
@@ -506,7 +506,7 @@ xmit:
skb_dst_set(skb, dst);
skb->dev = tdev;
- err = dst_output(xi->net, skb->sk, skb);
+ err = dst_output(xi->net, skb_to_full_sk(skb), skb);
if (net_xmit_eval(err) == 0) {
dev_sw_netstats_tx_add(dev, 1, length);
} else {