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

基于Docker的第二个XDP程序,有疑问? #16

Open
k8svip opened this issue Jun 18, 2023 · 0 comments
Open

基于Docker的第二个XDP程序,有疑问? #16

k8svip opened this issue Jun 18, 2023 · 0 comments

Comments

@k8svip
Copy link

k8svip commented Jun 18, 2023

从上面的例子可以看到XDP BPF程序只会对传给目标网卡的数据包进行丢弃,不会影响从目标网卡出去的数据包,也就是只影响ingress流量。那么能不能控制egress流量呢?

以上是你得出的结论:我有个疑问,我自己做实验没有像你视频中的一样,可以在容器所有网络名称空间下还能curl通https://www.baidu.com/

我的理解:在宿主机上面对vethxxx进行了 drop所有tcp协议,那么容器内的eth0就不应该收到任何的tcp包的,127.0.0.1除外。
veth peer 是成对出现的,我既然在宿主上面dorp掉一端,为什么在容器所有网络名称空间下还能curl通呢。

你视频中显示在容器网络名称空间内还能curl通,不理解原理是什么。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant