-
Notifications
You must be signed in to change notification settings - Fork 3.4k
node: Remove permanent ARP entry when remote node is deleted #10227
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
Conversation
We manage only ARP entries, which is IPV4-only, so it doesn't make sense to do it if IPv4 is disabled. Signed-off-by: Martynas Pumputis <m@lambda.lt>
Release note label not set, please set the appropriate release note. |
4 similar comments
Release note label not set, please set the appropriate release note. |
Release note label not set, please set the appropriate release note. |
Release note label not set, please set the appropriate release note. |
Release note label not set, please set the appropriate release note. |
test-me-please |
1926876
to
2d9ff70
Compare
When IPsec or NodePort is enabled, we add a permanent ARP entry (remote node IP => remote node MAC addr) upon receiving a NodeUpdate event. The entry is needed to facilitate calls to fib_lookup() from the datapath. Up until now, the permanent entry was not removed when the remote node was deleted. This could lead to a problem, when a packet destined to a new node which reused the IP addr of the deleted node was dropped due to the wrong MAC addr until NodeUpdate event for the new node had been received. This commit fixes the problem by removing obsolete ARP entries. Signed-off-by: Martynas Pumputis <m@lambda.lt>
test-me-please |
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.
Can't this be unit tested since we have a pkg/datapath/linux/node_test.go
file for this?
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 thanks for doing this.
@aanm Can we merge this? I'm going to add the tests after I've finished my work on a major feature. |
I'll defer that decision to @joestringer. |
@brb please file an issue to follow up on the tests just to make sure it doesn't get dropped. Manual testing of something like this is as good as no testing, it could regress at any time. Unit tests at the very least should not require a large commitment. The change itself looks pretty straightforward and has relevant signoffs so LGTM. |
Also, I marked this as a bugfix as this seems like it could cause neighbour cache to grow unchecked if there is much node churn. |
@joestringer @aanm Created an issue for testing: #10341. |
When IPsec or NodePort is enabled, we add a permanent ARP entry (remote node IP => remote node MAC addr) upon receiving a NodeUpdate event. The entry is needed to facilitate calls to
fib_lookup()
from the datapath.Up until now, the permanent entry was not removed when the remote node was deleted. This could lead to a problem, when a packet destined to a new node which reused the IP addr of the deleted node was dropped due to the wrong MAC addr until NodeUpdate event for the new node had been received.
This PR fixes the problem by removing obsolete ARP entries.
Tested manually.
Reviewable per commit.
Fixes #10197.
This change is