Skip to content

Add missing ct keys#310

Merged
stapelberg merged 1 commit intogoogle:mainfrom
nickgarlis:add-missing-ct-keys
Mar 26, 2025
Merged

Add missing ct keys#310
stapelberg merged 1 commit intogoogle:mainfrom
nickgarlis:add-missing-ct-keys

Conversation

@nickgarlis
Copy link
Copy Markdown
Contributor

The following keys were missing from the CtKey type:

  • NFT_CT_SRC_IP
  • NFT_CT_DST_IP
  • NFT_CT_SRC_IP6
  • NFT_CT_DST_IP6
  • NFT_CT_ID

Since they also seem to be missing from the unix package, their actual values were added.

@nickgarlis
Copy link
Copy Markdown
Contributor Author

nickgarlis commented Mar 25, 2025

@stapelberg I am happy to add a full test in nftables_test.go if you want this merged. I am just not entirely sure how you generated expected message here ?

Did you extract the values from command like nft --debug=mnl add rule ip filter input ct state established,related accept or similar ?

Edit: Found the answer here

The following keys were missing from the CtKey type:

 - `NFT_CT_SRC_IP`
 - `NFT_CT_DST_IP`
 - `NFT_CT_SRC_IP6`
 - `NFT_CT_DST_IP6`
 - `NFT_CT_ID`

Since they also seem to be missing from the unix package, their actual
values were added.
@nickgarlis nickgarlis force-pushed the add-missing-ct-keys branch from e745822 to 85c93f1 Compare March 25, 2025 16:16
@stapelberg stapelberg merged commit e0bb410 into google:main Mar 26, 2025
2 checks passed
@stapelberg
Copy link
Copy Markdown
Collaborator

Thanks!

@yash97 yash97 mentioned this pull request Apr 17, 2026
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