mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-24 02:55:40 +08:00
return more random serial generation
This commit is contained in:
parent
8c95f4efcf
commit
efdbaee29f
@ -973,6 +973,7 @@ unsigned long udpresolve(unsigned char * name, unsigned *retttl, struct clientpa
|
|||||||
time_t t;
|
time_t t;
|
||||||
struct sockaddr_in sin, *sinsp;
|
struct sockaddr_in sin, *sinsp;
|
||||||
int usetcp = 0;
|
int usetcp = 0;
|
||||||
|
unsigned short serial = 1;
|
||||||
|
|
||||||
buf = b+2;
|
buf = b+2;
|
||||||
|
|
||||||
@ -1010,7 +1011,9 @@ unsigned long udpresolve(unsigned char * name, unsigned *retttl, struct clientpa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
len = (int)strlen((char *)name);
|
len = (int)strlen((char *)name);
|
||||||
*(unsigned short*)buf = htons(i+1); /* query id */
|
|
||||||
|
serial = myrand(name,len);
|
||||||
|
*(unsigned short*)buf = serial; /* query id */
|
||||||
buf[2] = 1; /* recursive */
|
buf[2] = 1; /* recursive */
|
||||||
buf[3] = 0;
|
buf[3] = 0;
|
||||||
buf[4] = 0;
|
buf[4] = 0;
|
||||||
@ -1054,7 +1057,7 @@ unsigned long udpresolve(unsigned char * name, unsigned *retttl, struct clientpa
|
|||||||
buf+=2;
|
buf+=2;
|
||||||
len-=2;
|
len-=2;
|
||||||
}
|
}
|
||||||
if(*(unsigned short *)buf != htons(i+1))continue;
|
if(*(unsigned short *)buf != serial)continue;
|
||||||
if((na = buf[7] + (((unsigned short)buf[6])<<8)) < 1) {
|
if((na = buf[7] + (((unsigned short)buf[6])<<8)) < 1) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#define VERSION "3proxy-0.8b-devel"
|
#define VERSION "3proxy-0.8b-devel"
|
||||||
#define BUILDDATE "141211031205"
|
#define BUILDDATE "141211034918"
|
||||||
|
Loading…
Reference in New Issue
Block a user