From: Alan T. DeKok Date: Wed, 2 Oct 2019 02:19:55 +0000 (-0400) Subject: clients can be proto UDP, TCP, or * X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00c865655d95044eda5e59e2a8b140fcd2df46e4;p=thirdparty%2Ffreeradius-server.git clients can be proto UDP, TCP, or * --- diff --git a/src/bin/radmin.c b/src/bin/radmin.c index b823c950a63..945c393f3cf 100644 --- a/src/bin/radmin.c +++ b/src/bin/radmin.c @@ -735,10 +735,7 @@ static int cmd_show_client(FILE *fp, FILE *fp_err, UNUSED void *ctx, fr_cmd_info fprintf(fp_err, "No such client.\n"); return -1; } else { - client = client_find(NULL, &info->box[0]->vb_ip, IPPROTO_UDP); - if (client) goto found; - - client = client_find(NULL, &info->box[0]->vb_ip, IPPROTO_TCP); + client = client_find(NULL, &info->box[0]->vb_ip, IPPROTO_IP); /* hack */ if (!client) goto not_found; } @@ -746,6 +743,15 @@ found: fprintf(fp, "shortname\t%s\n", client->shortname); fprintf(fp, "secret\t\t%s\n", client->secret); + if (client->proto == IPPROTO_UDP) { + fprintf(fp, "proto\t\tudp\n"); + + } else if (client->proto == IPPROTO_TCP) { + fprintf(fp, "proto\t\ttcp\n"); + } else { + fprintf(fp, "proto\t\t*\n"); + } + return 0; }