Skip to content

Fix stale MACsec peer SCI on same-host chain edges - #145

Merged
GyulyVGC merged 1 commit into
mainfrom
fix/macsec-peer-sci-race
Aug 5, 2026
Merged

Fix stale MACsec peer SCI on same-host chain edges#145
GyulyVGC merged 1 commit into
mainfrom
fix/macsec-peer-sci-race

Conversation

@GyulyVGC

@GyulyVGC GyulyVGC commented Aug 5, 2026

Copy link
Copy Markdown
Member

Same-host chain setup keyed its MACsec RX SA by reading the peer veth's MAC.
Since a macsec device inherits its parent veth's MAC, net-id reuse could leave the two passes reading different incarnations of the pair — one side then expects an SCI that no longer exists, and MACsec drops the unmatched frames silently.
The edge goes dead in one direction while the control plane reports it established.

Derives both veth MACs from the net id so each side's SCI is a pure function of $VXLAN_ID, serializes setup/teardown per net id with a flock, and matches XFRM teardown on SPI/dstport rather than endpoints (which stop describing what setup installed once an id is reissued).

Fixes #144

@GyulyVGC GyulyVGC self-assigned this Aug 5, 2026
@GyulyVGC GyulyVGC added the bug Something isn't working label Aug 5, 2026

@GyulyVGC GyulyVGC left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🐛

@GyulyVGC
GyulyVGC merged commit a711758 into main Aug 5, 2026
4 checks passed
@GyulyVGC
GyulyVGC deleted the fix/macsec-peer-sci-race branch August 5, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Same-host chain edges can be built with a stale MACsec peer SCI, silently black-holing all return traffic

1 participant