-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Nftables implementation #1881
Nftables implementation #1881
Conversation
cdf9f83
to
00863cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks very good!
601f55b
to
fb437ca
Compare
fb437ca
to
0b5f386
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
0b5f386
to
0e8ae59
Compare
pkg/trafficmngr/nftables/nftables.go
Outdated
log.Infof("Changing default FORWARD chain policy to ACCEPT") | ||
tx := nftm.nftv4.NewTransaction() | ||
|
||
//TODO how to express that the default is drop? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to DROP by default? I think we can add a simple "drop" rule at the end of the chain. I saw that on the class the policy
value is missing it should be something like this type filter hook forward priority -100; policy drop;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we don't need to drop by default. we just need to make sure that the flannel traffic is forwarded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I was confused by the question. It shouldn't drop but it should continue the chain in case it's not matching the flannel subnet using the default configuration of the node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's the default behavior so it should be fine as it is.
From the comment in flannel code, the forward rules seem needed for old versions of docker anyway.
e95551d
to
6728b43
Compare
This PR allows flannel to use nftables natively instead of iptables. This is used essentially to masquerade traffic coming from the pods. The PR also fixes the clean-up mechanism in the iptables implementation.
6728b43
to
f244861
Compare
Description
Todos
Release Note