[Serdev] STUN server in SER

Alfred E. Heggestad aeh at db.org
Wed Jan 17 18:34:47 UTC 2007


Hi

I have done some more testing of the embedded STUN server in SER 0.10 (from CVS).
Here are some of my comments:


* Calculation of the length field for 400 Bad Request ERROR responses is wrong.

* The calculation of mandatory attributes is wrong, the STUN Server should accept
   any optional attributes >= 0x8000 (see attached patch).

* The variable req->old checks if the STUN request is a RFC3489 or 3489bis request
   (based on MAGIC_COOKIE) - but it seems that the meaning is reversed ?

* The calculation of XOR_MAPPED_ADDRESS seems be wrong. Check the host order vs.
   network order of MAGIC_COOKIE, port number and IPv4 address. (see attached patch)
   Calculation of IPv6 address must also be checked

* The error code reason phrases defined in ser_stun.h should be changed to the
   text in the brackets of rfc3489bis section 11.6 - e.g. instead of

     300 The client should contact an alternate server for this request.

   you should use:

     300 Try Alternate


Please see the attached patch for some fixes ..


/alfred
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ser-stun.patch
Type: text/x-patch
Size: 1385 bytes
Desc: not available
Url : http://lists.iptel.org/pipermail/serdev/attachments/20070117/061f3b89/ser-stun.bin


More information about the Serdev mailing list