diff --git a/src/auth.c b/src/auth.c index c149e1a..0525f95 100644 --- a/src/auth.c +++ b/src/auth.c @@ -973,6 +973,7 @@ unsigned long udpresolve(unsigned char * name, unsigned *retttl, struct clientpa time_t t; struct sockaddr_in sin, *sinsp; int usetcp = 0; + unsigned short serial = 1; buf = b+2; @@ -1010,7 +1011,9 @@ unsigned long udpresolve(unsigned char * name, unsigned *retttl, struct clientpa } } 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[3] = 0; buf[4] = 0; @@ -1054,7 +1057,7 @@ unsigned long udpresolve(unsigned char * name, unsigned *retttl, struct clientpa buf+=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) { return 0; } diff --git a/src/version.h b/src/version.h index c2572d8..b96ed57 100644 --- a/src/version.h +++ b/src/version.h @@ -1,2 +1,2 @@ #define VERSION "3proxy-0.8b-devel" -#define BUILDDATE "141211031205" +#define BUILDDATE "141211034918"