mirror of
https://github.com/CHN-beta/xmurp-ua.git
synced 2026-01-11 17:29:28 +08:00
fix Makefile and Kconfig issue
This commit is contained in:
8
Makefile
8
Makefile
@@ -2,19 +2,19 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=rkp-ua
|
||||
PKG_RELEASE:=28
|
||||
PKG_RELEASE:=33
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
EXTRA_CFLAGS:= \
|
||||
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
|
||||
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
|
||||
-DVERSION $(PKG_RELEASE)
|
||||
-DVERSION=$(PKG_RELEASE) --verbose
|
||||
|
||||
MAKE_OPTS:=$(KERNEL_MAKE_FLAGS) \
|
||||
SUBDIRS="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
||||
CONFIG_rkp-ua=m
|
||||
CONFIG_RKP_UA=m
|
||||
|
||||
define KernelPackage/rkp-ua
|
||||
SUBMENU:=Other modules
|
||||
@@ -28,4 +28,4 @@ define Build/Compile
|
||||
$(MAKE) -C "$(LINUX_DIR)" $(MAKE_OPTS) modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage, rkp-ua))
|
||||
$(eval $(call KernelPackage,rkp-ua))
|
||||
@@ -1,2 +1,2 @@
|
||||
config rkp-ua
|
||||
config RKP_UA
|
||||
tristate "rkp-ua"
|
||||
@@ -1 +1 @@
|
||||
obj-${CONFIG_rkp-ua} += rkp-ua.o
|
||||
obj-${CONFIG_RKP_UA} += rkp-ua.o
|
||||
@@ -17,7 +17,7 @@
|
||||
const unsigned char* str_ua_start = "User-Agent: ";
|
||||
const unsigned char* str_ua_end = "\r\n";
|
||||
const unsigned char* str_head_end = "\r\n\r\n";
|
||||
const unsigned char* str_ua_rkp = "RKP/" VERSION;
|
||||
const unsigned char str_ua_rkp[7];
|
||||
|
||||
time_t now()
|
||||
{
|
||||
|
||||
@@ -32,6 +32,9 @@ static int __init hook_init(void)
|
||||
rkpm = rkpManager_new();
|
||||
last_flush = now();
|
||||
|
||||
memcpy(str_ua_rkp, "RKP/", 4);
|
||||
memcpy(str_ua_rkp, VERSION, 3);
|
||||
|
||||
nfho.hook = hook_funcion;
|
||||
nfho.pf = NFPROTO_IPV4;
|
||||
nfho.hooknum = NF_INET_POST_ROUTING;
|
||||
|
||||
Reference in New Issue
Block a user