smartdns icon indicating copy to clipboard operation
smartdns copied to clipboard

nft 添加 ipset 错误

Open cresky-github opened this issue 1 year ago • 5 comments

问题现象
不是所有nft动作都失败,但遇有失败

nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:File exists nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:ip is invalid nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:No such file or directory nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:Resource temporarily unavailable

目前,只发现有4 种情况

这4 种错误,是什么意思 啊?

cresky-github avatar May 30 '24 09:05 cresky-github

nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:File exists

nft存在,但尝试重复创建。这个应该没影响

nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:ip is invalid

nft是ipv4表,但尝试添加ipv6记录?或者ip/子网 不匹配

nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:No such file or directory

nft不存在,但尝试添加记录

nftset add failed, family:inet, table:PROXY.NAT, set:ipset_smartdns, error:Resource temporarily unavailable

猜测是没权限(nft需要root

以上都是我的猜测(平时用ipt不用nft

PikuZheng avatar May 30 '24 10:05 PikuZheng

error:File exists 对我来说,很重要。 因为,要拿去分流的,查nftset了,确实没记录。

error:ip is invalid 应该是测速失败造成的,应该是不能访问的那种IP,或者是 timeout。对我没什么实质影响。

cresky-github avatar May 30 '24 11:05 cresky-github

貌似返回多个IP时, 最后一个IP发生概率 更大。

cresky-github avatar May 30 '24 11:05 cresky-github

error:File exists 对我来说,很重要。 因为,要拿去分流的,查nftset了,确实没记录。

也可能ipset里已经有对应的ip(段)了。比如存在192.168.0.0/16,那么添加192.168.1.0/24就会报File exists

PikuZheng avatar May 30 '24 22:05 PikuZheng

error:File exists 对我来说,很重要。 因为,要拿去分流的,查nftset了,确实没记录。

也可能ipset里已经有对应的ip(段)了。比如存在192.168.0.0/16,那么添加192.168.1.0/24就会报File exists

再去验证一下这说法。 再折腾折腾,看看能否解决问题。 如若不能,只能另想它法。

cresky-github avatar May 31 '24 01:05 cresky-github