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

[FEATURE]ebpf中有没可以复制数据包的helper函数 #80

Open
pengbinbin1 opened this issue Nov 21, 2023 · 1 comment
Open

[FEATURE]ebpf中有没可以复制数据包的helper函数 #80

pengbinbin1 opened this issue Nov 21, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@pengbinbin1
Copy link

想利用ebpf实现流量审计的功能,具体是通过捕获特定端口的数据包,然后将数据包复制一份发送到指定的服务网卡,原始数据继续走剩余的正常的网络协议栈,不知道有没有大佬有过类似的实现,求助

@pengbinbin1 pengbinbin1 added the enhancement New feature or request label Nov 21, 2023
@yunwei37 yunwei37 added the help wanted Extra attention is needed label Jan 21, 2024
@yunwei37
Copy link
Member

yunwei37 commented Sep 7, 2024

应该是用 XDP,然后剩下用

  • bpf_redirect():直接重定向数据包到指定的网卡。
  • bpf_clone_redirect():会克隆当前的数据包并发送到指定的接口,原始数据包依然继续走正常的网络协议栈

最近刚用 XDP 一段时间,所以才回(请见谅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants