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

Pflua should maybe emit a parse error for "proto tcp" #255

Open
takikawa opened this issue Sep 16, 2016 · 1 comment
Open

Pflua should maybe emit a parse error for "proto tcp" #255

takikawa opened this issue Sep 16, 2016 · 1 comment

Comments

@takikawa
Copy link
Member

On this expression, tcpdump emits a syntax error:

/usr/sbin/tcpdump -d "proto tcp"
tcpdump: syntax error

While Pflua has an internal error:

$ ../tools/pflua-compile "proto tcp"
luajit: ./pf/expand.lua:1149: attempt to index local 'op' (a nil value)
stack traceback:
    ./pf/expand.lua:1149: in function 'expand_arith'
    ./pf/expand.lua:1169: in function 'expand_relop'
    ./pf/expand.lua:1187: in function 'expand_bool'
    ./pf/expand.lua:1182: in function 'expand_bool'
    ./pf/expand.lua:1214: in function 'expand'
    ./pf.lua:37: in function 'compile_filter'
    ../tools/pflua-compile:58: in main chunk
    [C]: at 0x004046e0

@kbara
Copy link
Contributor

kbara commented Sep 19, 2016

Agreed, that would be better.

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

No branches or pull requests

2 participants