Opened 15 years ago

Closed 15 years ago

#1058 closed defect (fixed)

Different size between pj_sockaddr_in6 and native sockaddr_in6 on 64bit systems, causing failure in using SIP IPv6 UDP transport

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.6
Component: pjlib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp)

On 64bit Linux:

sizeof(struct sockaddr_in6) is 28 bytes,

sizeof(pj_sockaddr_in6) is 32 bytes.

This is because struct pj_in6_addr is aligned to 8 bytes.

This causes failure in using SIP IPv6 UDP transport, with the following error:

16:43:15.266 pjsua_acc.c Unable to generate suitable Contact header for registration: Unsupported transport (PJSIP_EUNSUPTRANSPORT) [status=171060]

16:43:15.266 pjsua_acc.c Unable to create registration: Unsupported transport (PJSIP_EUNSUPTRANSPORT) [status=171060]

Thanks Simon Perreault for the report.

Change History (3)

comment:1 Changed 15 years ago by bennylp

  • Description modified (diff)
  • Summary changed from Structure pj_sockaddr_in6 has different size than native sockaddr_in6 on Linux to Different size between pj_sockaddr_in6 and native sockaddr_in6 on 64bit systems, causing failure in using SIP IPv6 UDP transport

Changing the title and description, as this probably is 64bit specific. This system is affected:

$ uname -a
Linux x200s 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010 x86_64 GNU/Linux
$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
..
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9)

while this system is not:

$ uname -a
nanang-desktop 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux
$ gcc -v
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)

comment:2 Changed 15 years ago by bennylp

  • Milestone changed from Known-Issues-and-Ideas to release-1.6

comment:3 Changed 15 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r3145:

  • removed u6_addr64 field from pj_in_addr6
Note: See TracTickets for help on using tickets.