Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] nftset mask not work as expected #667

Closed
4 tasks done
Dachtire opened this issue Apr 24, 2023 · 3 comments
Closed
4 tasks done

[Bug] nftset mask not work as expected #667

Dachtire opened this issue Apr 24, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Dachtire
Copy link

Dachtire commented Apr 24, 2023

在提交之前,请确认

  • 我已经尝试搜索过 Issue ,但没有找到相关问题。
  • 我正在使用最新的 mosdns 版本(或者最新的 commit),问题依旧存在。
  • 我仔细看过 wiki 后仍然无法自行解决该问题。
  • 我非常确定这是 mosdns 核心的问题。(如果是通过第三方衍生软件使用 mosdns 核心,不确定问题源头时,请先向衍生软件开发者提交问题。)

mosdns 版本

v5.1.3-0-gac99eb1

操作系统

linux-amd64

Bug 描述和复现步骤

for example, cloudflare.com get ipv4: 1.1.1.1, ipv6: 2606:4700::1111,
when the mask set to ipv4/32, ipv6/128,
wrong result in nftables is {1.1.1.1-255.255.255.255}, {2606:4700::1111-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff},
which supposed to be {1.1.1.1}, {2606:4700::1111}.

使用的配置文件

- tag: seq
    type: sequence
    args:
      - exec: forward 192.168.1.1
      - exec: nftset inet,table,set4,ipv4_addr,32 inet,table,set6,ipv6_addr,128
      - exec: accept

  - tag: srv
    type: udp_server
    args:
      entry: seq
      listen: "127.0.0.1:53"

mosdns 的 log 记录

No response

@IrineSistiana IrineSistiana added the bug Something isn't working label Apr 28, 2023
@ctermiii
Copy link

同遇到该问题

@IrineSistiana
Copy link
Owner

方便的话可以自行编译这个分支看看问题是不是解决了

https://github.com/IrineSistiana/mosdns/tree/fix_667

@Dachtire
Copy link
Author

tested looks fine, problem solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants