Skip to content

Conversation

@aojea
Copy link

@aojea aojea commented Oct 21, 2025

Add support to set CT labels, that is very useful for scenarios like kubernetes, see full context in https://lore.kernel.org/netfilter-devel/[email protected]/T/#mae18a8bb815a95d7bd8a496792bd6e0ee9029e00

and kubernetes-sigs/kube-network-policies#268

This is basically a copy paste of SetVerdictWithConnMark and SetVerdictModPacketWithConnMark but passing the byte array directly.

I do not know if the kernel expects an specific format, it seems to me that only works with a 16 byte array, but I can not fully confirm that is the contract. In case that is the case we can do some input validation

@florianl
Copy link
Owner

Thanks for your contribution! 🙏
I do have to look more into details to provide feedback to the raised questions.

@aojea
Copy link
Author

aojea commented Oct 21, 2025

Thanks for your contribution! 🙏 I do have to look more into details to provide feedback to the raised questions.

I followed up on the mail thread in the description asking about the size of the labels array

@aojea
Copy link
Author

aojea commented Oct 21, 2025

It seems is indeed 16 bytes https://github.com/vishvananda/netlink/pull/1135/files#r2449806010

Signed-off-by: Antonio Ojea <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants