diff options
author | 2023-02-08 09:30:16 +0300 | |
---|---|---|
committer | 2023-02-08 13:47:47 -0300 | |
commit | b4f6b4f229d291daf7c35c6f1e7f4841cc6d69bc (patch) | |
tree | 9586e7b81411c2e48195ae125a2da3d8a3cd5520 | |
parent | ipc: freebsd: NULL out some freed memory in kernel_set_device() (diff) | |
download | wireguard-tools-b4f6b4f229d291daf7c35c6f1e7f4841cc6d69bc.tar.xz wireguard-tools-b4f6b4f229d291daf7c35c6f1e7f4841cc6d69bc.zip |
show: fix show all endpoints output
Currently "wg show all endpoints" prints interface name only once
while other "show all" commands print it on each line as man says.
Signed-off-by: Dmitry Selivanov <dseliv@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/show.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -312,9 +312,9 @@ static bool ugly_print(struct wgdevice *device, const char *param, bool with_int else printf("off\n"); } else if (!strcmp(param, "endpoints")) { - if (with_interface) - printf("%s\t", device->name); for_each_wgpeer(device, peer) { + if (with_interface) + printf("%s\t", device->name); printf("%s\t", key(peer->public_key)); if (peer->endpoint.addr.sa_family == AF_INET || peer->endpoint.addr.sa_family == AF_INET6) printf("%s\n", endpoint(&peer->endpoint.addr)); |