Closed love4taylor closed 6 years ago
@Love4Taylor
高版本内核不再使用nf_nat_range
, 而使用nf_nat_range2
打一下下面这个补丁就好了
--- a/xt_FULLCONENAT.c
+++ b/xt_FULLCONENAT.c
@@ -472,7 +472,7 @@ static unsigned int fullconenat_tg(struct sk_buff *skb, const struct xt_action_p
struct nat_mapping *mapping, *src_mapping;
unsigned int ret;
- struct nf_nat_range newrange;
+ struct nf_nat_range2 newrange;
__be32 new_ip, ip;
uint16_t port, original_port, want_port;
@edward-p get!
@Love4Taylor 高版本内核不再使用
nf_nat_range
, 而使用nf_nat_range2
打一下下面这个补丁就好了--- a/xt_FULLCONENAT.c +++ b/xt_FULLCONENAT.c @@ -472,7 +472,7 @@ static unsigned int fullconenat_tg(struct sk_buff *skb, const struct xt_action_p struct nat_mapping *mapping, *src_mapping; unsigned int ret; - struct nf_nat_range newrange; + struct nf_nat_range2 newrange; __be32 new_ip, ip; uint16_t port, original_port, want_port;
大佬,求教现在最新的openwrt是5.4内核的,编译出错如下: CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh DESCEND objtool LINK /home/ubuntu/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.22/tools/objtool/objtool /usr/bin/ld: warning: libc.so, needed by /home/ubuntu/openwrt/staging_dir/target-x86_64_musl/usr/lib/libelf.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: /home/ubuntu/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.22/tools/objtool/objtool: hidden symbol `fstat' in /usr/lib/x86_64-linux-gnu/libc_nonshared.a(fstat.oS) is referenced by DSO /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[5]: [Makefile:50: /home/ubuntu/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.22/tools/objtool/objtool] Error 1 make[4]: [Makefile:67: objtool] Error 2 这个应该怎么解决啊。万分感谢!