zerotier / zerotier/ZeroTierOne
`macsrc` and `macdest` matches values are improperly parsed
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
The rules compiler (featured in the official controller) automatically reformat MAC addresses to separate bytes with colon characters. For example, 0123456789AB becomes 01:23:45:67:89:AB. Matches macsrc (MATCH_MAC_SOURCE in JSON) and macdest (MATCH_MAC_DEST in JSON) are parsed in a way that doesn't ignore the : character, and treat it as if it was carrying address information (the current implementation treats it as a 0). In the end, the filtering engine doesn't get the valid MAC address and thus comparisons with packet MAC addresses fails.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the rules compiler's parsing of macsrc (MATCH_MAC_SOURCE in JSON) and macdest (MATCH_MAC_DEST in JSON), focusing on how colon-separated MAC addresses are converted. Reproduce the failure with a formatted address such as 01:23:45:67:89:AB, then verify that the filtering engine compares the resulting value correctly against packet MAC addresses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100