Issue Details (XML | Word | Printable)

Key: JSIP-290
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: jsip-issues
Reporter: sophie0308
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
jsip

The stack does not discard extra bytes in transport package beyond the end of the body.

Created: 11/Jun/10 07:49 PM   Updated: 11/Jun/10 07:49 PM
Component/s: www
Affects Version/s: current
Fix Version/s: milestone 1

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: PC


Issuezilla Id: 290
Tags:
Participants: jsip-issues and sophie0308


 Description  « Hide

Description:
On receipt of an INVITE request using UDP transport, including a body part
longer than the length indicated in the Content-Length header field, sip stack
should ignore extra bytes and forwards the message, but sip stack recalculates
the length of the body and update the value in Content-Length header.

Example:
The INVITE request received is showed below:
INVITE sip:9876@172.21.110.108 SIP/2.0
To: <sip:9876@172.21.115.16>
From: <sip:4321@172.21.115.16>;tag=a3bhg
Call-ID: c3eF6f58-363323Cd-8058EB88-10303123@172.21.110.107
Contact: <sip:4321@172.21.110.107:5060>
CSeq: 1 INVITE
Max-Forwards: 6
Via: SIP/2.0/UDP 172.21.110.107:5060;branch=z9hG4bKkdjuw2241
Allow: INVITE, ACK, BYE, CANCEL, REFER, OPTIONS, REGISTER, SUBSCRIBE
Content-Type: application/sdp
Content-Length: 151

v=0
o=Valid8.com-UserAgent 8521 32 IN IP4 172.21.110.107
s=SIP-Call
c=IN IP4 172.21.110.107
t=0 0
m=audio 5008 RTP/AVP 0
a=rtpmap:0 pcmu/8000/1
a=rtpmap:4 pcma/8000/1

The stack will recalculate the Content-Length, then forward the request
upstream. The message is showed below:

INVITE sip:9876@172.21.110.108 SIP/2.0
To: <sip:9876@172.21.115.16>
From: <sip:4321@172.21.115.16>;tag=a3bhg
Call-ID: c3eF6f58-363323Cd-8058EB88-10303123@172.21.110.107
Contact: <sip:4321@172.21.110.107:5060>
CSeq: 1 INVITE
Max-Forwards: 6
Via: SIP/2.0/UDP 172.21.110.107:5060;branch=z9hG4bKkdjuw2241
Allow: INVITE, ACK, BYE, CANCEL, REFER, OPTIONS, REGISTER, SUBSCRIBE
Content-Type: application/sdp
Content-Length: 179

v=0
o=Valid8.com-UserAgent 8521 32 IN IP4 172.21.110.107
s=SIP-Call
c=IN IP4 172.21.110.107
t=0 0
m=audio 5008 RTP/AVP 0
a=rtpmap:0 pcmu/8000/1
a=rtpmap:4 pcma/8000/1

Reference:
RFC3261 Section18.3 Framing
In the case of message-oriented transports (such as UDP), if the message has
a Content-Length header field, the message body is assumed to contain that many
bytes. If there are additional bytes in the transport packet beyond the end of
the body, they MUST be discarded.



There are no comments yet on this issue.