Skip to content

Commit 9c5414a

Browse files
Fix incorrect peer transfer stats (#131)
1 parent 97bc4ad commit 9c5414a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/wgfreebsd/client_freebsd.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ func (c *Client) ConfigureDevice(name string, cfg wgtypes.Config) error {
179179
}
180180
}
181181

182-
183182
m := unparseConfig(cfg)
184183
mem, sz, err := nv.Marshal(m)
185184
if err != nil {
@@ -406,7 +405,7 @@ func parsePeer(v nv.List) wgtypes.Peer {
406405
}
407406

408407
if v, ok := v["tx-bytes"]; ok {
409-
p.ReceiveBytes = int64(v.(uint64))
408+
p.TransmitBytes = int64(v.(uint64))
410409
}
411410

412411
if v, ok := v["allowed-ips"]; ok {

0 commit comments

Comments
 (0)