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

lxd/firewall: Fix nftables ACL template #12423

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

rafalborczuch
Copy link

Network interface name must be double-quoted to avoid collisions with the nftables syntax.

For example a bridge network called rt will cause the following error prior to this commit:

Error: syntax error, unexpected rt
           iifname rt jump acl.rt
                   ^^

when trying to set ACL:
lxc network set rt security.acls="rt-acl"
because rt is a restricted token in the nftables syntax: https://wiki.nftables.org/wiki-nftables/index.php/Quick_reference-nftables_in_10_minutes#Rt

Network interface name must be double-quoted to avoid
collisions with the nftables syntax.

For example a bridge network called `rt` will cause the following error prior to this commit:
```
Error: syntax error, unexpected rt
           iifname rt jump acl.rt
                   ^^
```
when trying to set ACL:
`lxc network set rt security.acls="rt-acl"`
because `rt` is a restricted token in the nftables syntax:
https://wiki.nftables.org/wiki-nftables/index.php/Quick_reference-nftables_in_10_minutes#Rt

Signed-off-by: Rafal Borczuch <rafalq.b@gmail.com>
@tomponline
Copy link
Member

Thanks!

@tomponline tomponline merged commit 6ab06f9 into canonical:main Oct 20, 2023
24 of 25 checks passed
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