- } else if (strcmp(buf, "debug") == 0) {
- debug = atoi(p);
- log(debug, 0, 0, 0, "Set debugging level to %d\n", debug);
- } else if (strcmp(buf, "accounting dir") == 0) {
- accounting_dir = strdup(p);
- log(debug, 0, 0, 0, "Will dump accounting information to %s\n", accounting_dir);
- } else if (strcmp(buf, "dns server") == 0) {
- unsigned long addr = 0;
- if (inet_aton(p, (struct in_addr *)&addr) < 0) {
- printf("Invalid DNS server %s\n", p);
- continue;
- }
- if (default_dns1 == 0)
- default_dns1 = addr;
- else if (default_dns2 == 0)
- default_dns2 = addr;
- } else if (strcmp(buf, "radius server") == 0) {
- struct hostent *h = gethostbyname(p);
- if (h)
- {
- while (*h->h_addr_list)
- {
- ipt ip = ntohl(*(u32 *) * h->h_addr_list);
- if (numradiusservers < MAXRADSERVER)
- radiusserver[numradiusservers++] = ip;
- else
- log(0, 0, 0, 0, "Too many RADIUS IPs\n");
- h->h_addr_list++;
- }
- }
- else
- { // may be IP?
- ipt ip = ntohl(inet_addr(p));
- if (ip && ip != 0xFFFFFFFF)
- {
- if (numradiusservers < MAXRADSERVER)
- radiusserver[numradiusservers++] = ip;
- else
- log(0, 0, 0, 0, "Too many RADIUS IPs\n");
- }
- else
- log(0, 0, 0, 0, "Unknown server %s\n", p);
- }
- } else if (strcmp(buf, "snoop host") == 0) {
- snoop_destination_host = strdup(p);
- } else if (strcmp(buf, "snoop port") == 0) {
- snoop_destination_port = atol(p);
- } else if (strcmp(buf, "bind address") == 0) {
- if (!bind_address)
- {
- // Already overridden on the command line
- bind_address = inet_addr(p);
- handle_interface = 1;
- }
- } else if (strcmp(buf, "dump speed") == 0) {
- dump_speed = atoi(p);
- } else if (strcmp(buf, "setuid") == 0) {
- target_uid = atoi(p);
- } else if (strcmp(buf, "cluster master") == 0) {
- struct hostent *h = gethostbyname(p);
- if (h)