(closes issue #13848)
Reported by: klaus3000
Patches:
udptl.c.patch uploaded by eliel (license 64)
Tested by: blitzrage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159475
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
#define TRUE (!FALSE)
#endif
-static int udptlstart;
-static int udptlend;
+static int udptlstart = 4500;
+static int udptlend = 4599;
static int udptldebug; /*!< Are we debugging? */
static struct sockaddr_in udptldebugaddr; /*!< Debug packets to/from this host */
#ifdef SO_NO_CHECK
setsockopt(udptl->fd, SOL_SOCKET, SO_NO_CHECK, &nochecksums, sizeof(nochecksums));
#endif
/* Find us a place */
- x = (ast_random() % (udptlend - udptlstart)) + udptlstart;
+ x = (udptlstart == udptlend) ? udptlstart : (ast_random() % (udptlend - udptlstart)) + udptlstart;
startplace = x;
for (;;) {
udptl->us.sin_port = htons(x);