WireGuard / wgctrl-go

Package wgctrl enables control of WireGuard interfaces on multiple platforms.
https://godoc.org/golang.zx2c4.com/wireguard/wgctrl
MIT License
727 stars 85 forks source link

Peer list is empty #70

Closed tapir closed 4 years ago

tapir commented 4 years ago

I have a wg0 up and wg command shows

interface: wg0
  public key: Y3Rl1Sz+kqmPYdbhpPDt5hNi55RUoWdbZQ9gjgxo8Vs=
  private key: (hidden)
  listening port: 44884
  fwmark: 0xca6c

peer: vSVK3Lri4HFW0ztVCy181M81+nO24+sY1xIVYAwcYwk=
  endpoint: 94.237.85.150:51820
  allowed ips: 0.0.0.0/0, ::/0
  transfer: 0 B received, 148 B sent

I can query the wg0 device though wgctrl-go as seen below

&{wg0 Linux kernel aOpy+HOCNz8mXqXAluECXnMfPKOWAKFOjfgxYS0zZk0= Y3Rl1Sz+kqmPYdbhpPDt5hNi55RUoWdbZQ9gjgxo8Vs= 44884 51820 []}

However, as seen above, the peer slice is empty. Any ideas why?

Thanks

mdlayher commented 4 years ago

Which kernel? Are you using the latest commit?

tapir commented 4 years ago
wireguard-dkms 0.0.20190913-1 [installed]
linux 5.3.1.arch1-1 (base) [installed]

I'm on arch linux. These seems to be installed.

mdlayher commented 4 years ago

I just fixed an issue like this one. Are you using the latest commit of this library?

tapir commented 4 years ago

Ah sorry thought you meant wg. Will try when I get home.

mdlayher commented 4 years ago

No problem, just wanted to try to rule out some variables!

tapir commented 4 years ago

Started working correctly after go get -u Thanks