From 0746327c62714c92d7c969db8e18d74c042944b3 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sat, 20 Dec 2025 10:42:18 -0500 Subject: [PATCH] jool: fix build for 6.18 Add backport to fix build against 6.18 kernel. Signed-off-by: John Audia --- net/jool/Makefile | 2 +- .../200-fix-compilation-in-v6.18.patch | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 net/jool/patches/200-fix-compilation-in-v6.18.patch diff --git a/net/jool/Makefile b/net/jool/Makefile index 97baba7435..e5271d5d9a 100644 --- a/net/jool/Makefile +++ b/net/jool/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=jool PKG_VERSION:=4.1.14 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=COPYING diff --git a/net/jool/patches/200-fix-compilation-in-v6.18.patch b/net/jool/patches/200-fix-compilation-in-v6.18.patch new file mode 100644 index 0000000000..01b948e1b5 --- /dev/null +++ b/net/jool/patches/200-fix-compilation-in-v6.18.patch @@ -0,0 +1,37 @@ +From 89bd7a029b3ed81ac3b4e582b4049d2ea8722970 Mon Sep 17 00:00:00 2001 +From: Tj +Date: Mon, 1 Dec 2025 18:24:47 +0000 +Subject: [PATCH] Fix compilation in v6.18 + +struct flowi4.tos renamed to 'dscp' and type dscp_t in commit +1bec9d0c0046fe4e2bfb6a1c5aadcb5d56cdb0fb +--- + src/mod/common/rfc7915/6to4.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/src/mod/common/rfc7915/6to4.c ++++ b/src/mod/common/rfc7915/6to4.c +@@ -203,7 +203,11 @@ static verdict compute_flowix64(struct x + hdr6 = pkt_ip6_hdr(&state->in); + + flow4->flowi4_mark = state->in.skb->mark; ++#if LINUX_VERSION_AT_LEAST(6, 18, 0, 0, 0) ++ flow4->flowi4_dscp = xlat_tos(&state->jool.globals, hdr6); ++#else + flow4->flowi4_tos = xlat_tos(&state->jool.globals, hdr6); ++#endif + flow4->flowi4_scope = RT_SCOPE_UNIVERSE; + flow4->flowi4_proto = xlat_proto(hdr6); + /* +@@ -645,7 +649,11 @@ static verdict ttp64_ipv4_external(struc + + hdr4->version = 4; + hdr4->ihl = 5; ++#if LINUX_VERSION_AT_LEAST(6, 18, 0, 0, 0) ++ hdr4->tos = flow4->flowi4_dscp; ++#else + hdr4->tos = flow4->flowi4_tos; ++#endif + hdr4->tot_len = cpu_to_be16(state->out.skb->len); + generate_ipv4_id(state, hdr4, hdr_frag); + hdr4->frag_off = xlat_frag_off(hdr_frag, state);