IPv6 support for authnserver

This commit is contained in:
z3APA3A committed 2014-12-13 22:56:31 +03:00
1 parent 8a6632f0d1
commit 50db0015d3
6 files changed
+23 -29

No files matched your search

+9 -1
View File
@@ -1022,8 +1022,16 @@ static int h_nserver(int argc, unsigned char **argv){
}
static int h_authnserver(int argc, unsigned char **argv){
char *str;
authnserver = getip(argv[1]);
if((str = strchr((char *)argv[1], '/')))
*str = 0;
if(!getip46(46, argv[1], (struct sockaddr *)&authnserver.addr)) return 1;
*SAPORT(&authnserver.addr) = htons(53);
if(str) {
authnserver.usetcp = strstr(str + 1, "tcp")? 1:0;
*str = '/';
}
return 0;
}