Skip to content

Commit 0746327

Browse files
graysky2BKPepe
authored andcommitted
jool: fix build for 6.18
Add backport to fix build against 6.18 kernel. Signed-off-by: John Audia <[email protected]>
1 parent ab903f5 commit 0746327

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

net/jool/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk
99

1010
PKG_NAME:=jool
1111
PKG_VERSION:=4.1.14
12-
PKG_RELEASE:=2
12+
PKG_RELEASE:=3
1313

1414
PKG_LICENSE:=GPL-2.0-only
1515
PKG_LICENSE_FILES:=COPYING
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From 89bd7a029b3ed81ac3b4e582b4049d2ea8722970 Mon Sep 17 00:00:00 2001
2+
3+
Date: Mon, 1 Dec 2025 18:24:47 +0000
4+
Subject: [PATCH] Fix compilation in v6.18
5+
6+
struct flowi4.tos renamed to 'dscp' and type dscp_t in commit
7+
1bec9d0c0046fe4e2bfb6a1c5aadcb5d56cdb0fb
8+
---
9+
src/mod/common/rfc7915/6to4.c | 8 ++++++++
10+
1 file changed, 8 insertions(+)
11+
12+
--- a/src/mod/common/rfc7915/6to4.c
13+
+++ b/src/mod/common/rfc7915/6to4.c
14+
@@ -203,7 +203,11 @@ static verdict compute_flowix64(struct x
15+
hdr6 = pkt_ip6_hdr(&state->in);
16+
17+
flow4->flowi4_mark = state->in.skb->mark;
18+
+#if LINUX_VERSION_AT_LEAST(6, 18, 0, 0, 0)
19+
+ flow4->flowi4_dscp = xlat_tos(&state->jool.globals, hdr6);
20+
+#else
21+
flow4->flowi4_tos = xlat_tos(&state->jool.globals, hdr6);
22+
+#endif
23+
flow4->flowi4_scope = RT_SCOPE_UNIVERSE;
24+
flow4->flowi4_proto = xlat_proto(hdr6);
25+
/*
26+
@@ -645,7 +649,11 @@ static verdict ttp64_ipv4_external(struc
27+
28+
hdr4->version = 4;
29+
hdr4->ihl = 5;
30+
+#if LINUX_VERSION_AT_LEAST(6, 18, 0, 0, 0)
31+
+ hdr4->tos = flow4->flowi4_dscp;
32+
+#else
33+
hdr4->tos = flow4->flowi4_tos;
34+
+#endif
35+
hdr4->tot_len = cpu_to_be16(state->out.skb->len);
36+
generate_ipv4_id(state, hdr4, hdr_frag);
37+
hdr4->frag_off = xlat_frag_off(hdr_frag, state);

0 commit comments

Comments
 (0)