bugzilla-daemon at netfilter.org
2017-Oct-06 17:33 UTC
[Bug 1189] New: Include of a file not robust to missing newline at EOF
https://bugzilla.netfilter.org/show_bug.cgi?id=1189 Bug ID: 1189 Summary: Include of a file not robust to missing newline at EOF Product: nftables Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 Component: nft Assignee: pablo at netfilter.org Reporter: netfilter at allycomm.com Created attachment 509 --> https://bugzilla.netfilter.org/attachment.cgi?id=509&action=edit Files to reproduce missing-newline behavior; no subdirectory If a file used by an "include" statement does not have a newline at its end, it will cause a parse/lex issue that is reported elsewhere. While the trivial example supplied that error is immediately after the inclusion, it can be more difficult to trace down when multiple files are included in the same context. To Reproduce =========== * In a suitable directory, extract the attached tar (flat files, no subdirectory) $ sudo nft -c -f nftables.conf nftables.conf:17:5-9: Error: syntax error, unexpected chain chain inside-nftables-after-no-newline { ^^^^^ Suggested resolutions ==================== * At a minimum, warn if an included file does not have a terminal newline * If there is not a valid use case for inclusion of a file without a terminal newline, additionally fix the parser/lexer so that it does not error -- You are receiving this mail because: You are watching all bug changes. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20171006/037d4a64/attachment.html>
bugzilla-daemon at netfilter.org
2020-Jan-28 23:56 UTC
[Bug 1189] Include of a file not robust to missing newline at EOF
https://bugzilla.netfilter.org/show_bug.cgi?id=1189 kfm at plushkava.net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kfm at plushkava.net -- You are receiving this mail because: You are watching all bug changes. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20200128/e39fc3fb/attachment.html>
Apparently Analagous Threads
- [Bug 1175] New: Document limitations on identifier names
- [Bug 1176] New: Invalid identifiers produce unhelpful error messages
- [Bug 1179] New: vmap and sets cause "BUG: invalid range expression type set"
- [Bug 1202] New: Cannot match on both dport and sport in one nftables rule
- [Bug 1319] New: Exporting a map with many elements to JSON will fail