Skip to content

tunnel route ip show: --filter-network-is-subset-of sends the superset filter #1750

Open

Description

@davidscottpope-gif

cloudflared tunnel route ip show --filter-network-is-subset-of <cidr> (alias --nsub) queries the API with network_superset=<cidr> instead of network_subset=<cidr>, so it behaves identically to --filter-network-is-superset-of.

Cause: in cfapi/ip_route_filter.go, NewIpRouteFilterFromCLI calls f.NetworkIsSupersetOf(*subset). NetworkIsSubsetOf exists but is never called.

Reproduced on master (059f86a) with a test that encodes the filter. Fix is a one-line change plus a regression test. Happy to send a PR if that works for you.

AI disclosure: I used AI tools to find and reproduce this; I reviewed it myself.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions