On 11/27/06, Konstantin Belousov <[EMAIL PROTECTED]> wrote:
> I tried to use stunc stun client on freebsd (6.2-PRERELEASE), and
> systematically got errno == EINVAL from the call su_sendto() at the
> stun_common.c:619 (with the latest darcs sources). The problem seems to
> be the last argument to sendto(), that is the sizeof(su_sockaddr_t),
> that is 0x20 on freebsd6/i386. The kernel expects it to be equal to the
> sizeof(struct sockaddr_af) for correspoding address family af. The patch
> below fixed it to me, at least for AF_INET.

Thanks for reporting the bug. The len field is not really present in
the sockaddr structures of most systems, including Linux, Solaris and
winsock, so you have to calculate the correct size based on the
address family (su_family) field. There is a macro SU_SOCKADDR_SIZE()
for that purpose.

I pushed a patch using SU_SOCKADDR_SIZE() to darcs.

-- 
Pekka.Pessi mail at nokia.com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to