Fix show all endpoints output
PATCH 1/1 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.
--- src/show.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
src/show.c +2 -2
@@ -312,9 +312,9 @@ static bool ugly_print(struct wgdevice *device, const char *param, bool with_intelse 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));
Signature · 1 line
2.30.2
Thanks.
Can you send this with a Signed-off-by: line like every commit in that repository does, please? Then I'll apply this.
Jason
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 <[email protected]>
--- src/show.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
src/show.c +2 -2
@@ -312,9 +312,9 @@ static bool ugly_print(struct wgdevice *device, const char *param, bool with_intelse 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));
Signature · 1 line
2.30.2