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;
}
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;
}