lxdyy / rfc5766-turn-server

Automatically exported from code.google.com/p/rfc5766-turn-server
0 stars 0 forks source link

Issues with channel binding and rtcp ports in uclient. #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
uclient tries to bind the same channel multiple times.   This fails with some 
turn servers as restund.

uclient uses RTCP port instead of RTP port when you run it without RTCP.

Patch attached.

Original issue reported on code.google.com by g...@tokbox.com on 27 Mar 2013 at 5:20

Attachments:

GoogleCodeExporter commented 8 years ago
Uclient is supposed to be a dirty ugly test example program and I am surprised 
that anybody would file a bug against it. But I'll fix it.

Although, the fix for the multiple channels would be more complex than that: 
the TURN server itself has to be fixed because it must not allow multiple 
channels requests to the same peer address with different channel numbers. It 
must allow multiple requests with the same peer address and the same channel 
number. That has to be fixed, the uclient is just a canary here :)

The reason why RTP and RTCP channels use the same peer address is that because 
the test "peer" program simply has only one listening port. I can make it 
listening to two ports ("RTP" and "RTCP") so that RTP and RTCP channels will be 
talking to different ports.

So, all three components have to be changed - the turnserver, the uclient, and 
the peer. I'll do it soon.

Thanks for reporting.

Original comment by mom040...@gmail.com on 27 Mar 2013 at 6:52

GoogleCodeExporter commented 8 years ago
In my test  RTP and RTCP channels DO NOT use the same peer address.    RTP 
channel use port X+1 while RTCP channel use port X.     Check the patch with my 
changes.

Original comment by g...@tokbox.com on 27 Mar 2013 at 7:06

GoogleCodeExporter commented 8 years ago
For "create permission" request and for UDP traffic relay they both use the 
same peer address. They issue multiple "channel bind" requests for two 
different addresses with the sole purpose to screw the server (because the 
"uclient" is a test program and its purpose is NOT to behave properly, its 
purpose is to find holes in the server implementation). Check the wireshark 
trace - all UDP traffic from RTP and from RTCP is going to the same peer 
address. So, the only real problem is that the turnserver allows those 
duplicate requests. But I'll also update the uclient and the peer so that you 
will have two separate traffic streams for RTP and for RTCP.

Original comment by mom040...@gmail.com on 27 Mar 2013 at 7:55

GoogleCodeExporter commented 8 years ago
Fixed.

Original comment by mom040...@gmail.com on 27 Mar 2013 at 9:21