Skip to content

No statistics and timeout when using dual-stack wireguard tunnel #617

@dupondje

Description

@dupondje

Issue

No network statistics are shown in the UI. And the tunnel times out because there is no activity.
This while the logs give the following:

{ message: "Network activity statistics for interface wg0 sent to the client" }
{ message: "Found 1 peers configured on WireGuard interface" }
{ message: "Peer xxxxxxxx= statistics didn't change; ignoring it." }

The cause

To get the data, the client calls read_interface_data.
Now on dual-stack tunnels, netlink seems to return 2 peers. One for IPv4, one for IPv6.
But only the IPv4 one returns the TxBytes etc:

                                        LastHandshake(
                                            SystemTime {
                                                tv_sec: 1760018513,
                                                tv_nsec: 47243476,
                                            },
                                        ),
                                        PersistentKeepalive(
                                            25,
                                        ),
                                        TxBytes(
                                            245028,
                                        ),
                                        RxBytes(
                                            905264,
                                        ),

The IPv6 one does NOT.
But only the IPv6 one is returned by read_interface_data, causing incomplete data, causing this to fail :)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Ready to release

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions