aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--Makefile6
-rw-r--r--README.md11
3 files changed, 23 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index e43b0f9..65852ce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,8 @@
.DS_Store
+.tmp_versions
+*.ko
+*.cmd
+*.o
+modules.order
+Module.symvers
+*.mod.c \ No newline at end of file
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..923d738
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,6 @@
+obj-m = xt_FULLCONENAT.o
+KVERSION = $(shell uname -r)
+all:
+ make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
+clean:
+ make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
diff --git a/README.md b/README.md
index 4020fdf..0061b73 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,16 @@ Prerequisites:
* kernel source
* iptables source (git://git.netfilter.org/iptables.git)
-Kernel Module
+Replace `xt_FULLCONENAT.c` with `xt_FULLCONENAT-old-kernel.c` if your kernel version is somehow below 4.1x and have issue compiling the module source.
+
+Kernel Module (as standalone module)
+-------------
+```
+$ make
+# insmod xt_FULLCONENAT.ko
+```
+
+Kernel Module (in-tree building)
-------------
1. Copy xt_FULLCONENAT.c to `kernel-source/net/netfilter/xt_FULLCONENAT.c`
2. Append following line to `kernel-source/net/netfilter/Makefile`: