zerotier / zerotier/ZeroTierOne

Unable to compile macro with multiple arguments

Open
#642 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Central & Network Management Status: Backlog Type: Bug
Dominant language
C++
Stars
17.1k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

% cat rules
macro allow_service($service, $tag, $port)
  tag $service
    id $tag
    enum 0 no
    enum 1 yes
    default 0
  ;
  accept
    ipprotocol tcp
    and tseq $service yes
    and dport $port
  ;
;

include allow_service(samba, 2000, 445)
% node cli.js rules
ERROR parsing rules line 1 column 30: Unrecognized action or directive in rule set.
% node -v
v8.7.0
% git rev-parse --short HEAD
dae72812

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduced rules file and the node cli.js rules entry point, using the reported parser error at line 1, column 30 as the first diagnostic. Trace how include allow_service(samba, 2000, 445) is parsed and verify the example compiles successfully with multiple macro arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, node.js
Domain
cli, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.