Skip to content

[regression?] If two or more Address, AllowedIPs are specified, only the first one is recognized #207

@akku1139

Description

@akku1139

For example, old wgcf generates this config (also found in #10)

[Interface]
PrivateKey = [hidden]
Address = [hidden]/32
Address = [hidden]/128
DNS = 1.1.1.1
MTU = 1280
[Peer]
PublicKey = [hidden]
AllowedIPs = 0.0.0.0/0
AllowedIPs = ::/0
Endpoint = engage.cloudflareclient.com:2408

It should be interpreted as:

[Interface]
PrivateKey = [hidden]
Address = [hidden]/32, [hidden]/128
DNS = 1.1.1.1
MTU = 1280
[Peer]
PublicKey = [hidden]
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = engage.cloudflareclient.com:2408

This config is works correctly with wireguard-tools-wg-quick-1.0.20260223-r0(Alpine Linux), old wireproxy.
But 1.1.2-1.1 (cachyos-extra-v3) seems to interpret it as like:

[Interface]
PrivateKey = [hidden]
Address = [hidden]/32
DNS = 1.1.1.1
MTU = 1280
[Peer]
PublicKey = [hidden]
AllowedIPs = 0.0.0.0/0
Endpoint = engage.cloudflareclient.com:2408

(So IPv6 won't work)
This behavior is against the wireguard spec (debian manual, unofficial doc):

Address — a comma-separated list of IP (v4 or v6) addresses (optionally with CIDR masks) to be assigned to the interface. May be specified multiple times.

AllowedIPs

This defines the IP ranges for which a peer will route traffic. On simple clients, this is usually a single address (the VPN address of the simple client itself). For bounce servers this will be a range of the IPs or subnets that the relay server is capable of routing traffic for. Multiple IPs and subnets may be specified using comma-separated IPv4 or IPv6 CIDR notation (from a single /32 or /128 address, all the way up to 0.0.0.0/0 and ::/0 to indicate a default route to send all internet and VPN traffic through that peer). This option may be specified multiple times.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions