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

Set mainENIRule mask #340

Merged
merged 1 commit into from
Mar 13, 2019
Merged

Set mainENIRule mask #340

merged 1 commit into from
Mar 13, 2019

Conversation

tustvold
Copy link
Contributor

@tustvold tustvold commented Mar 7, 2019

  • Re-add the mask for the mainENIRule. Without this calico breaks NodePort traffic on secondary ENIs, as whilst the traffic is correctly marked by iptables, the ip rule that forces the traffic out of the primary ENI is impacted by other bits sets by calico in the mask

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mogren mogren self-requested a review March 8, 2019 00:10
@mogren mogren self-assigned this Mar 8, 2019
@mogren
Copy link
Contributor

mogren commented Mar 12, 2019

I'm afraid I don't understand exactly what this change does or how this impacts Calico. @2ffs2nns or @caseydavenport, could you please help me out?

@tustvold
Copy link
Contributor Author

tustvold commented Mar 13, 2019

If you don't set the mask the routing rule looks for packets with the exact mark instead of just the bit that is set from conntrack. As calico uses the marks in order to implement filtering, this breaks the routing that forces NodePort traffic out of the primary ENI.

@mogren
Copy link
Contributor

mogren commented Mar 13, 2019

Ah, thanks @tustvold, that makes sense. Also found the iptables documentation saying:

--mark value[/mask]

Matches packets in connections with the given mark value (if a mask is specified, this is logically ANDed with the mark before the comparison).

Copy link
Contributor

@mogren mogren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this.

@mogren mogren added bug calico Calico integration issue labels Mar 13, 2019
@mogren mogren added this to the v1.4 milestone Mar 13, 2019
@mogren mogren merged commit 53e247b into aws:master Mar 13, 2019
mogren referenced this pull request Apr 8, 2019
Based on #232, but includes a version bump to v3.3.5 to get the
libcalico-go #1051 fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug calico Calico integration issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants