mirror of
https://github.com/LiBwrt/nss-packages.git
synced 2025-12-16 17:15:09 +00:00
add qca-mcs patch for kernel 6.12
This commit is contained in:
parent
cfb2f96387
commit
93eb755ac6
78
qca-mcs/patches/0003-kernel-6.12.patch
Normal file
78
qca-mcs/patches/0003-kernel-6.12.patch
Normal file
@ -0,0 +1,78 @@
|
||||
--- a/mc_netfilter.c
|
||||
+++ b/mc_netfilter.c
|
||||
@@ -27,6 +27,8 @@
|
||||
#include "mc_api.h"
|
||||
#include "mc_osdep.h"
|
||||
|
||||
+#include "mc_netfilter.h"
|
||||
+
|
||||
/* mc_br_port_get
|
||||
* get bridge port by ifindex
|
||||
*/
|
||||
@@ -49,7 +51,7 @@ static struct net_bridge_port *mc_br_por
|
||||
/* mc_pre_routing_hook
|
||||
* prerouting hook
|
||||
*/
|
||||
-static unsigned int mc_pre_routing_hook(void *priv,
|
||||
+unsigned int mc_pre_routing_hook(void *priv,
|
||||
struct sk_buff *skb,
|
||||
const struct nf_hook_state *state)
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
|
||||
@@ -233,7 +235,7 @@ static bool mc_is_report_or_leave(struct
|
||||
/* mc_forward_hook
|
||||
* forward hook to the linux kernel
|
||||
*/
|
||||
-static unsigned int mc_forward_hook(void *priv,
|
||||
+unsigned int mc_forward_hook(void *priv,
|
||||
struct sk_buff *skb,
|
||||
const struct nf_hook_state *state)
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
|
||||
--- a/mc_netfilter.h
|
||||
+++ b/mc_netfilter.h
|
||||
@@ -23,7 +23,15 @@ void mc_netfilter_exit(void);
|
||||
#include <linux/netfilter.h>
|
||||
#include <linux/netdevice.h>
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0))
|
||||
+unsigned int mc_pre_routing_hook(void *priv,
|
||||
+ struct sk_buff *skb,
|
||||
+ const struct nf_hook_state *state);
|
||||
+
|
||||
+unsigned int mc_forward_hook(void *priv,
|
||||
+ struct sk_buff *skb,
|
||||
+ const struct nf_hook_state *state);
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
|
||||
unsigned int mc_pre_routing_hook(const struct nf_hook_ops *ops, struct sk_buff *skb,
|
||||
const struct net_device *in, const struct net_device *out,
|
||||
int(*okfn)(struct sk_buff *));
|
||||
--- a/mc_snooping.c
|
||||
+++ b/mc_snooping.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/rculist.h>
|
||||
#include <linux/timer.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <linux/random.h>
|
||||
#include <net/ip.h>
|
||||
@@ -3529,7 +3529,7 @@ static const struct file_operations mc_p
|
||||
/* mc_proc_create_snooper_entry
|
||||
* create proc entry for information show
|
||||
*/
|
||||
-int mc_proc_create_snooper_entry(void) {
|
||||
+static int mc_proc_create_snooper_entry(void) {
|
||||
|
||||
mc_proc_root = proc_mkdir(MCS_PROC_ROOT_NAME, init_net.proc_net);
|
||||
if (mc_proc_root) {
|
||||
--- a/mc_forward.c
|
||||
+++ b/mc_forward.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "mc_private.h"
|
||||
#include "mc_snooping.h"
|
||||
#include "mc_osdep.h"
|
||||
+#include "mc_forward.h"
|
||||
|
||||
static void mc_retag(void *iph, __be16 etype, __be32 dscp)
|
||||
{
|
||||
Loading…
Reference in New Issue
Block a user