You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
2.0 KiB
58 lines
2.0 KiB
From 8ee1e27facf598a1362b29b794e51271b5be4db7 Mon Sep 17 00:00:00 2001
|
|
From: Robert Marko <robimarko@gmail.com>
|
|
Date: Thu, 24 Feb 2022 15:01:11 +0100
|
|
Subject: [PATCH] conntrack: fix build with kernel 5.15 and musl
|
|
|
|
Currently, with kernel 5.15 headers and musl building is failing with
|
|
redefinition errors due to a conflict between the kernel and musl headers.
|
|
|
|
Musl is able to suppres the conflicting kernel header definitions if they
|
|
are included after the standard libc ones, however since ICMP definitions
|
|
were moved into a separate internal header to avoid duplication this has
|
|
stopped working and is breaking the builds.
|
|
|
|
It seems that the issue is that <netinet/in.h> which contains the UAPI
|
|
suppression defines is included in the internal.h header and not in the
|
|
proto.h which actually includes the kernel ICMP headers and thus UAPI
|
|
supression defines are not present.
|
|
|
|
Solve this by moving the <netinet/in.h> include before the ICMP kernel
|
|
includes in the proto.h
|
|
|
|
Fixes: bc1cb4b11403 ("conntrack: Move icmp request>reply type mapping to common file")
|
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
Signed-off-by: Florian Westphal <fw@strlen.de>
|
|
(cherry picked from commit 21ee35dde73aec5eba35290587d479218c6dd824)
|
|
---
|
|
include/internal/internal.h | 1 -
|
|
include/internal/proto.h | 1 +
|
|
2 files changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/include/internal/internal.h b/include/internal/internal.h
|
|
index 2ef8a9057628b..7cd7c44bf8336 100644
|
|
--- a/include/internal/internal.h
|
|
+++ b/include/internal/internal.h
|
|
@@ -14,7 +14,6 @@
|
|
#include <arpa/inet.h>
|
|
#include <time.h>
|
|
#include <errno.h>
|
|
-#include <netinet/in.h>
|
|
|
|
#include <libnfnetlink/libnfnetlink.h>
|
|
#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
|
|
diff --git a/include/internal/proto.h b/include/internal/proto.h
|
|
index 40e7bfe63cc77..60a5f4e4ff8e0 100644
|
|
--- a/include/internal/proto.h
|
|
+++ b/include/internal/proto.h
|
|
@@ -2,6 +2,7 @@
|
|
#define _NFCT_PROTO_H_
|
|
|
|
#include <stdint.h>
|
|
+#include <netinet/in.h>
|
|
#include <linux/icmp.h>
|
|
#include <linux/icmpv6.h>
|
|
|
|
--
|
|
2.38.0
|
|
|