Blame SOURCES/freeradius-added-D-option-to-mirror-radclient.patch

75e927
From 08700ea8b1f3a1ace01d294548f3ba2391cc06ab Mon Sep 17 00:00:00 2001
75e927
From: "Alan T. DeKok" <aland@freeradius.org>
75e927
Date: Sun, 2 Nov 2014 14:44:32 -0500
75e927
Subject: [PATCH 1/1] Added -D option to mirror radclient
75e927
75e927
---
75e927
 src/modules/proto_dhcp/dhcpclient.c | 7 ++++++-
75e927
 1 file changed, 6 insertions(+), 1 deletion(-)
75e927
75e927
diff --git a/src/modules/proto_dhcp/dhcpclient.c b/src/modules/proto_dhcp/dhcpclient.c
75e927
index ac52ffd..3bce4b3 100644
75e927
--- a/src/modules/proto_dhcp/dhcpclient.c
75e927
+++ b/src/modules/proto_dhcp/dhcpclient.c
75e927
@@ -73,6 +73,7 @@ static void NEVER_RETURNS usage(void)
75e927
 
75e927
 	fprintf(stderr, "  <command>              One of discover, request, offer, decline, release, inform.\n");
75e927
 	fprintf(stderr, "  -d <directory>         Set the directory where the dictionaries are stored (defaults to " RADDBDIR ").\n");
75e927
+	fprintf(stderr, "  -D <dictdir>           Set main dictionary directory (defaults to " DICTDIR ").\n");
75e927
 	fprintf(stderr, "  -f <file>              Read packets from file, not stdin.\n");
75e927
 	fprintf(stderr, "  -t <timeout>           Wait 'timeout' seconds for a reply (may be a floating point number).\n");
75e927
 	fprintf(stderr, "  -v                     Show program version information.\n");
75e927
@@ -270,7 +271,11 @@ int main(int argc, char **argv)
75e927
 
75e927
 	fr_debug_flag = 0;
75e927
 
75e927
-	while ((c = getopt(argc, argv, "d:f:hr:t:vx")) != EOF) switch(c) {
75e927
+	while ((c = getopt(argc, argv, "d:D:f:hr:t:vx")) != EOF) switch(c) {
75e927
+		case 'D':
75e927
+			dict_dir = optarg;
75e927
+			break;
75e927
+
75e927
 		case 'd':
75e927
 			radius_dir = optarg;
75e927
 			break;
75e927
-- 
75e927
2.1.3
75e927