[jitsi-dev] turnserver / ice4j tests / stun utility


#1

Using the `stun' client utility from the `stun' package in Debian[1], I
notice that turnserver doesn't respond at all, it just logs the following:

22:08:42.576473 [turnserver.c:4506] Received UDP on listening address
22:08:42.576580 [turnserver.c:3231] Bad magic cookie
22:08:42.576607 [turnserver.c:4528] Bad STUN/TURN message or permission
problem

I also test from ice4j (using test/Ice.java), specifically, I modify
Ice.java to only add one harvester:

agent.addCandidateHarvester(new StunCandidateHarvester(
            new TransportAddress("195.8.117.59", 3478, Transport.UDP)));

and I delete all the other harvester setup code for TURN and STUN.
Using just the StunCandidateHarvester, the Ice.java test seems to work
with turnserver:

22:17:57.900456 [turnserver.c:4506] Received UDP on listening address
22:17:57.900530 [turnserver.c:3580] OK basic validation are done,
process the TURN message
22:17:57.900545 [turnserver.c:2941] Process a TURN message
22:17:57.900557 [turnserver.c:1144] Binding request received!

Why does it say `Process a TURN message' when only using
StunCandidateHarvester?

By comparison, if I use reTurnServer from reSIProcate, it is able to
pass the tests with ice4j, but it also accepts the STUN packets from the
`stun' utility

Is this a sign of some bug, or is turnserver deliberately not compatible
with older STUN clients?

1. http://packages.debian.org/squeeze/stun
   http://sourceforge.net/projects/stun/


#2

Hi Daniel,

Le 06/10/2012 23:28, Daniel Pocock a �crit :

Using the `stun' client utility from the `stun' package in Debian[1], I
notice that turnserver doesn't respond at all, it just logs the following:

22:08:42.576473 [turnserver.c:4506] Received UDP on listening address
22:08:42.576580 [turnserver.c:3231] Bad magic cookie
22:08:42.576607 [turnserver.c:4528] Bad STUN/TURN message or permission
problem

If stun client utility uses old STUN RFC3489, it is normal: TurnServer supports only RFC5389 STUN messages.

I also test from ice4j (using test/Ice.java), specifically, I modify
Ice.java to only add one harvester:

agent.addCandidateHarvester(new StunCandidateHarvester(
             new TransportAddress("195.8.117.59", 3478, Transport.UDP)));

and I delete all the other harvester setup code for TURN and STUN.
Using just the StunCandidateHarvester, the Ice.java test seems to work
with turnserver:

22:17:57.900456 [turnserver.c:4506] Received UDP on listening address
22:17:57.900530 [turnserver.c:3580] OK basic validation are done,
process the TURN message
22:17:57.900545 [turnserver.c:2941] Process a TURN message
22:17:57.900557 [turnserver.c:1144] Binding request received!

Why does it say `Process a TURN message' when only using
StunCandidateHarvester?

Maybe a typo. This message is printed just before the specific handler for each message type.

Regards,

···

--
Seb

By comparison, if I use reTurnServer from reSIProcate, it is able to
pass the tests with ice4j, but it also accepts the STUN packets from the
`stun' utility

Is this a sign of some bug, or is turnserver deliberately not compatible
with older STUN clients?

1. http://packages.debian.org/squeeze/stun
    http://sourceforge.net/projects/stun/