mirror of
https://github.com/CHN-beta/xmurp-ua.git
synced 2024-10-22 19:38:44 +08:00
try fix crash issue
This commit is contained in:
parent
78c3a1208a
commit
027b500900
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=xmurp-ua
|
||||
PKG_RELEASE:=30
|
||||
PKG_RELEASE:=31
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=xmurp-ua
|
||||
PKG_RELEASE:=30
|
||||
PKG_RELEASE:=31
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
@ -60,10 +60,10 @@ make package/xmurp-ua/compile V=sc ARCH=mips CROSS_COMPILE=/home/chn/Desktop/led
|
||||
|
||||
#### 使用旧版 Makefile
|
||||
|
||||
对于 Openwrt 15.05(Chaos Calmer),Makefile 的格式与最新版本不同。使用 `Makefile.cc` 代替 `Makefile` 再编译。
|
||||
对于 Openwrt 15.05(Chaos Calmer),Makefile 的格式与最新版本不同。使用 `Chaos_Calmer.Makefile` 代替 `Makefile` 再编译。
|
||||
|
||||
```bash
|
||||
cp package/xmurp-ua/Makefile.cc package/xmurp-ua/Makefile
|
||||
cp package/xmurp-ua/Chaos_Calmer.Makefile package/xmurp-ua/Makefile
|
||||
```
|
||||
|
||||
#### 失效的 host 命令
|
||||
|
@ -149,7 +149,7 @@ unsigned int hook_funcion(void *priv, struct sk_buff *skb, const struct nf_hook_
|
||||
|
||||
static u_int32_t n_ua_modified = 0, n_ua_modify_faild = 0, n_not_modifible = 0, n_mark_matched = 0;
|
||||
static u_int32_t n_ua_modified_lastprint = 1;
|
||||
static u_int8_t mark_matched = 0;
|
||||
static u_int8_t mark_matched = 0, not_writable = 0;
|
||||
|
||||
register u_int8_t jump_to_next_function = 0, ret;
|
||||
|
||||
@ -200,8 +200,13 @@ unsigned int hook_funcion(void *priv, struct sk_buff *skb, const struct nf_hook_
|
||||
return NF_ACCEPT;
|
||||
|
||||
// 确保 skb 可以被修改,或者不可以被修改的话把它变得可修改
|
||||
if(skb_ensure_writable(skb, (char*)data_end - (char*)skb -> data))
|
||||
if(skb_ensure_writable(skb, (char*)data_end - (char*)skb -> data) || skb == 0 || skb -> data == 0)
|
||||
{
|
||||
if(!not_writable)
|
||||
{
|
||||
not_writable = 1;
|
||||
printk("xmurp-ua: There is a package not wirtable. Please make sure the router has enough memory.\n");
|
||||
}
|
||||
n_not_modifible++;
|
||||
n_ua_modify_faild++;
|
||||
catch_next_frag = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user