aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sip.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2019-05-01 01:58:14 +0100
committerPeter Wu <peter@lekensteyn.nl>2019-05-08 01:54:41 +0000
commit69e50be150eb21af03f3dc526e8c2dada948ecf2 (patch)
tree7b8a291d80d4a89c83bb8c7f21fc63b2328afb93 /epan/dissectors/packet-sip.c
parentbc4ffefdadea3724993a30fa58901720bc7a9ff8 (diff)
HTTP: fix bad reassembly with Content-Type and no Content-Length
Any request or response with the Content-Type header and no Content-Length header would cause the HTTP dissector to combine all segments until the end of the connection. This is bogus, it should only do this for HTTP responses under stricter conditions. To fix this issue: 1) explicitly disable body desegmentation for messages that never have a message body, 2) restrict "desegmentat until the end" to HTTP responses. The "Connection: Keep-Alive" case was a fix for bug 1142, but that is now properly addressed by checking for the 304 status code. Bug: 13116 Change-Id: I02371ac88ec2de6ee966fdc6df0dd246ad49c46d Reviewed-on: https://code.wireshark.org/review/33035 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan/dissectors/packet-sip.c')
-rw-r--r--epan/dissectors/packet-sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c
index aed92066de..f4560928ad 100644
--- a/epan/dissectors/packet-sip.c
+++ b/epan/dissectors/packet-sip.c
@@ -3408,9 +3408,11 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info
* Do header desegmentation if we've been told to,
* and do body desegmentation if we've been told to and
* we find a Content-Length header.
+ *
+ * RFC 6594, Section 20.14. requires Content-Length for TCP.
*/
if (!req_resp_hdrs_do_reassembly(tvb, offset, pinfo,
- sip_desegment_headers, sip_desegment_body)) {
+ sip_desegment_headers, sip_desegment_body, FALSE)) {
/*
* More data needed for desegmentation.
*/