Article delegate-en/3878 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A3874@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Bug with UDPRelay?
23 Oct 2007 17:35:55 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project


Hi,

On 10/23/07(13:16) you NoSFeRaTU <peihqbdyi-fjxi26em6qlr.ml@ml.delegate.org> wrote
in <_A3874@delegate-en.ML_>
 |Hello, I have a trouble with udprelay. Just after start all work fine, 
 |but after 10-15 requests I have that:
...
 |10/23 07:54:51.90 [7581] 0+0: willSTLS_SV: ServerFlags=600010
 |10/23 07:54:51.90 [7581] 0+0: VSocket CNCT/UDPRELAY *:* 
 |212.3.132.115:27015  = -1
 |10/23 07:54:51.90 [7581] 0+0: server_open(UDPRELAY,:0,listen=-1)
 |10/23 07:54:51.90 [7581] 0+0: server_open(UDPRELAY,:0) BOUND
 |10/23 07:54:51.90 [7581] 0+0: UDPRELAY start#32  [31](47) 
 |10.1.1.100:3047 > 212.3.132.115:27015

Hmm... the number #32 seems to imply the maximum number of UDP associations
in udprelay.c and

 |10/23 07:54:51.95 [7581] 0+0: No permission: 10.1.1.100:3048 > 
 |udprelay://3.132.115:27015
...
 |Why udprelay://3.132.115:27015?! I think it must be 
 |udprelay://212.3.132.115:27015

it seems that the first byte of IPv4 address is overwritten by the overflow.
I could reproduce the problem.  The overflow in this case is just by one
element but it could be three times at the maximum.
I will fix it as the enclosed patch in the next release. Thank you.

Cheers,
Yutaka
--
  9 9   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
 ( ~ )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller


diff -cr delegate9.7.5/src/udprelay.c delegate9.7.6-pre2/src/udprelay.c
*** delegate9.7.5/src/udprelay.c	Sat Feb 17 21:16:08 2007
--- delegate9.7.6-pre1/src/udprelay.c	Wed Oct 24 02:22:15 2007
***************
*** 314,321 ****
  	const char *clhost;
  	int clport;
  	UDP_Assoc *ua;
! 	UDP_Assoc *udpav[MAXASSOC]; /**/
! 	int udpxv[MAXASSOC];
  	int lastrelay,idle;
  	const char *aaddr;
  	int svportmap;
--- 314,321 ----
  	const char *clhost;
  	int clport;
  	UDP_Assoc *ua;
! 	UDP_Assoc *udpav[MAXASSOC*4]; /**/
! 	int udpxv[MAXASSOC*4];
  	int lastrelay,idle;
  	const char *aaddr;
  	int svportmap;

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V