Skip to content

Commit

Permalink
Don't display unix epoch timestamp coming from wireguard interface
Browse files Browse the repository at this point in the history
This happens on PSK/pubkey mismatch and is returned by wireguard in
userspace mode.
  • Loading branch information
lixmal committed Jan 18, 2024
1 parent 14625d0 commit d768a2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/cmd/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ func parsePeers(peers peersStateOutput) string {
}

lastWireguardHandshake := "-"
if !peerState.LastWireguardHandshake.IsZero() {
if !peerState.LastWireguardHandshake.IsZero() && peerState.LastWireguardHandshake != time.Unix(0, 0) {
lastWireguardHandshake = peerState.LastWireguardHandshake.Format("2006-01-02 15:04:05")
}

Expand Down

0 comments on commit d768a2a

Please sign in to comment.