|
@@ -97,6 +97,8 @@ MODULE_VERSION
|
|
#define NAT_UAC_TEST_S_1918 0x08
|
|
#define NAT_UAC_TEST_S_1918 0x08
|
|
#define NAT_UAC_TEST_RPORT 0x10
|
|
#define NAT_UAC_TEST_RPORT 0x10
|
|
|
|
|
|
|
|
+#define COOKIE_SIZE 128
|
|
|
|
+#define HOSTNAME_SIZE 100
|
|
|
|
|
|
#define DEFAULT_RTPP_SET_ID 0
|
|
#define DEFAULT_RTPP_SET_ID 0
|
|
#define MAX_RTPP_TRIED_NODES 50
|
|
#define MAX_RTPP_TRIED_NODES 50
|
|
@@ -2016,12 +2018,15 @@ static void mod_destroy(void)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
static char * gencookie(void)
|
|
static char * gencookie(void)
|
|
{
|
|
{
|
|
- static char cook[34];
|
|
|
|
|
|
+ static char cook[COOKIE_SIZE];
|
|
|
|
+ char hostname[HOSTNAME_SIZE];
|
|
|
|
+
|
|
|
|
+ if (gethostname(hostname, HOSTNAME_SIZE - 1) < 0)
|
|
|
|
+ strcpy(hostname, "host");
|
|
|
|
+ snprintf(cook, COOKIE_SIZE, "%s_%d_%u ", hostname, (int)mypid, myseqn);
|
|
|
|
|
|
- sprintf(cook, "%d_%u ", (int)mypid, myseqn);
|
|
|
|
myseqn++;
|
|
myseqn++;
|
|
return cook;
|
|
return cook;
|
|
}
|
|
}
|