[Home]

Summary:ASTERISK-14342: [patch] AST-2009-001 breaks IAX2 RFC5456 compliance - Timestamps in POKE/PONG zero in 2 of 4 Bytes
Reporter:Florian Floimair (ffloimair)Labels:
Date Opened:2009-06-19 04:19:26Date Closed:2009-06-29 16:32:52
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) ast_1.4.25_ppc.pcap
( 1) ast_1.4.25.1_ppc.pcap
( 2) ast1.4.25.1_i386.pcap
( 3) ts_issue.diff
Description:When using POKE/PONG requests the timestamp values are broken. Since 1.4.25 the timestamp in POKE and PONG IEs were identical.
However, when using Asterisk 1.4.25.1 in the POKE IE on PowerPC platforms the first 2 Bytes of the 4 Byte Timestamp are always 0, the second 2 Bytes are identical to the value in the PONG IE, so obviously the first two Bytes are zeroed for some reason. On x86 platforms however, the first two bytes are also zero and the second two Bytes show the value that is supposed to be in the first two Bytes.

Seems like there is 2 problems at once (endianess & addressing).

****** ADDITIONAL INFORMATION ******

I have attached 3 capture files

1st is PowerPC platform with 1.4.25 (working good)
2nd is PowerPC platform with 1.4.25.1 (buggy -> first two bytes 0, 2nd two bytes OK)
3rd is i386 platform with 1.4.25.1 (buggy --> first two bytes 0, 2nd two bytes have value which the first two bytes should have)
Comments:By: David Vossel (dvossel) 2009-06-19 15:20:11

I uploaded a patch that should do the trick.  This issue will be closed once I commit it, but feel free to reopen the issue if this does not resolve it for you.

By: Digium Subversion (svnbot) 2009-06-19 15:22:03

Repository: asterisk
Revision: 201993

U   branches/1.4/channels/chan_iax2.c

------------------------------------------------------------------------
r201993 | dvossel | 2009-06-19 15:22:02 -0500 (Fri, 19 Jun 2009) | 8 lines

timestamp was being converted to host order as a short rather than a long

(closes issue ASTERISK-14342)
Reported by: ffloimair
Patches:
     ts_issue.diff uploaded by dvossel (license 671)


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=201993

By: Digium Subversion (svnbot) 2009-06-19 15:24:38

Repository: asterisk
Revision: 201994

_U  trunk/
U   trunk/channels/chan_iax2.c

------------------------------------------------------------------------
r201994 | dvossel | 2009-06-19 15:24:38 -0500 (Fri, 19 Jun 2009) | 14 lines

Merged revisions 201993 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r201993 | dvossel | 2009-06-19 15:22:02 -0500 (Fri, 19 Jun 2009) | 8 lines
 
 timestamp was being converted to host order as a short rather than a long
 
 (closes issue ASTERISK-14342)
 Reported by: ffloimair
 Patches:
       ts_issue.diff uploaded by dvossel (license 671)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=201994

By: Digium Subversion (svnbot) 2009-06-19 15:26:03

Repository: asterisk
Revision: 201995

_U  branches/1.6.2/
U   branches/1.6.2/channels/chan_iax2.c

------------------------------------------------------------------------
r201995 | dvossel | 2009-06-19 15:26:03 -0500 (Fri, 19 Jun 2009) | 21 lines

Merged revisions 201994 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r201994 | dvossel | 2009-06-19 15:24:37 -0500 (Fri, 19 Jun 2009) | 14 lines
 
 Merged revisions 201993 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r201993 | dvossel | 2009-06-19 15:22:02 -0500 (Fri, 19 Jun 2009) | 8 lines
   
   timestamp was being converted to host order as a short rather than a long
   
   (closes issue ASTERISK-14342)
   Reported by: ffloimair
   Patches:
         ts_issue.diff uploaded by dvossel (license 671)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=201995

By: Digium Subversion (svnbot) 2009-06-19 15:26:57

Repository: asterisk
Revision: 201996

_U  branches/1.6.1/
U   branches/1.6.1/channels/chan_iax2.c

------------------------------------------------------------------------
r201996 | dvossel | 2009-06-19 15:26:57 -0500 (Fri, 19 Jun 2009) | 21 lines

Merged revisions 201994 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r201994 | dvossel | 2009-06-19 15:24:37 -0500 (Fri, 19 Jun 2009) | 14 lines
 
 Merged revisions 201993 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r201993 | dvossel | 2009-06-19 15:22:02 -0500 (Fri, 19 Jun 2009) | 8 lines
   
   timestamp was being converted to host order as a short rather than a long
   
   (closes issue ASTERISK-14342)
   Reported by: ffloimair
   Patches:
         ts_issue.diff uploaded by dvossel (license 671)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=201996

By: Digium Subversion (svnbot) 2009-06-19 15:27:31

Repository: asterisk
Revision: 201997

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_iax2.c

------------------------------------------------------------------------
r201997 | dvossel | 2009-06-19 15:27:31 -0500 (Fri, 19 Jun 2009) | 21 lines

Merged revisions 201994 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r201994 | dvossel | 2009-06-19 15:24:37 -0500 (Fri, 19 Jun 2009) | 14 lines
 
 Merged revisions 201993 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r201993 | dvossel | 2009-06-19 15:22:02 -0500 (Fri, 19 Jun 2009) | 8 lines
   
   timestamp was being converted to host order as a short rather than a long
   
   (closes issue ASTERISK-14342)
   Reported by: ffloimair
   Patches:
         ts_issue.diff uploaded by dvossel (license 671)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=201997