-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix syntax error when checking whether comment is supported #5
Conversation
Welcome @tnqn! |
nftables.go
Outdated
@@ -105,7 +105,7 @@ func newInternal(family Family, table string, execer execer) (Interface, error) | |||
// Check that (a) nft works, (b) we have permission, (c) the kernel is new enough | |||
// to support object comments. | |||
cmd = exec.Command(nft.path, "--check", "add", "table", string(nft.family), nft.table, | |||
"{", "comment", `"test"`, "}", | |||
"{", "comment", `"test"`, ";", "}", |
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.
🤦♂️
We should rewrite this to use nft.Check
now that that exists. Then that gets rid of the opportunity to get the syntax wrong...
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.
done
6291a6b
to
c6f2dcf
Compare
The check failed with "Error: syntax error, unexpected '}', expecting newline or semicolon" even when comment is supported. Signed-off-by: Quan Tian <qtian@vmware.com>
c6f2dcf
to
f2b1bd3
Compare
great catch. thanks |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danwinship, tnqn The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The check failed with "Error: syntax error, unexpected '}', expecting newline or semicolon" even when comment is supported.