Compatibility for kernel version 3

This commit is contained in:
Vadim Vetrov
2024-09-19 19:21:49 +03:00
parent 3187b3ca61
commit 5415bc37ec
7 changed files with 380 additions and 13 deletions

View File

@@ -1,3 +1,4 @@
#include "nf_wrapper.h"
#ifndef KERNEL_SPACE
#error "You are trying to compile the kernel module not in the kernel space"
#endif
@@ -25,9 +26,7 @@ MODULE_VERSION("0.3.2");
MODULE_AUTHOR("Vadim Vetrov <vetrovvd@gmail.com>");
MODULE_DESCRIPTION("Linux kernel module for youtube unblock");
static unsigned int ykb_nf_hook(void *priv,
struct sk_buff *skb,
const struct nf_hook_state *state) {
static NF_CALLBACK(ykb_nf_hook, skb) {
int ret;
if ((skb->mark & config.mark) == config.mark)