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

Allow multiple CIDR ranges in build_netmap when using LAN shorthands #118

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

codemicro
Copy link
Contributor

@codemicro codemicro commented Nov 22, 2024

This PR makes it possible to use LAN shorthands when specifying custom CIDR ranges. For example, in the situation where you want to allow connections from both the various local networking places and from Tailscale, you would want to do:

xff-src: lan, 100.64.0.0/10

but this currently does not work and instead causes copyparty to fail to start.

This is because shorthands are currently detected by comparison to the whole comma-separated string - this PR moves shorthand expansion to after the parsing step to make the above example work as expected.

This PR complies with the DCO; https://developercertificate.org/

:)

Signed-off-by: akp <abi@tdpain.net>
@codemicro codemicro changed the title Allow multiple CIDR ranges in build_netmap when using prebuilt shorthands Allow multiple CIDR ranges in build_netmap when using LAN shorthands Nov 22, 2024
@9001 9001 merged commit 0e31cfa into 9001:hovudstraum Nov 22, 2024
@9001
Copy link
Owner

9001 commented Nov 22, 2024

Nice! thanks for catching and fixing this 😁 👍

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