aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sip.c
AgeCommit message (Collapse)AuthorFilesLines
2021-02-07sip: populate stats tables' rows only onceMartin Kaiser1-21/+30
Sip uses two different statistics tables. We check for each one if it already exists. If so, we don't populate the rows again, we just clear the data that was collected when the tap parsed the packets. Fixes: b00c3bd742 ("sip: create the statistics tables only once")
2021-02-04SIP: Fix header Id mappingJaap Keuter1-4/+4
Fixes #17215
2021-01-31sip: create the statistics tables only onceMartin Kaiser1-5/+14
For sip, we have two different statistics tables for requests and responses. Create each table only once, check if it already exists.
2021-01-13SIP: Fix parsing of multiple contact-paramUli Heilmeier1-5/+6
contact-params are optional (s. https://tools.ietf.org/html/rfc3261#section-20.10). Therefore, independently of contact-params, we should also check for additional contact-param. Fixes: wireshark/wireshark#13752
2020-10-03Update URLs pointing to the bug database.Guy Harris1-1/+1
Switch from bugs.wireshark.org to the GitLab issues list.
2020-09-27Fix some wrong filter names.Martin Mathieson1-3/+3
These were detected by running check_typed_item_calls.py with --consecutive, which flags items that have different labels but the same filter string. Usually this is because of copy/paste. Quite a few similar bugs still exist, will address in a future commit.
2020-09-10Issue 16683 - SIP - Dissection of Logme Marker in the Session ID header of ↵atul3581-2/+30
the sip packet
2020-08-31More spelling fixes, last part of 2nd pass of dissectors.Martin Mathieson1-5/+5
2020-04-12SIP: Differentiate the Display Info itemsJaap Keuter1-6/+85
Currently every URI that carries display information has that presented as the same field. This makes specific filtering difficult. This change introduces seperate fields for every URI type, while preserving the common display info field as hidden item. A display field has been introduced for every URI handled, whether or not the field is described in an RFC. Practice learns that it may be done anyway. Bug: 16488 Change-Id: I15bf10e3fbdcce581a62182c205976a751c98c69 Reviewed-on: https://code.wireshark.org/review/36773 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-04-12Fix up some broken links to specs from dissectors.Martin Mathieson1-3/+3
check_dissector_urls.py was written and used to find URLs within epan/dissectors/*.c and try to fetch them using 'requests'. Will be commmitted separately. Most of the changes were to adapt to reorganisation of IETF or 3gpp2 links, but many of the broken links are for websites or companies that no longer exist. Change-Id: Ie9afdb95099218402a61626a0cd5193c6f781b96 Reviewed-on: https://code.wireshark.org/review/36769 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-02-16More issues spotted by PVS-Studio in bug 16335.Martin Mathieson1-1/+0
Only the change to packet-imap.c really represents a bug. Change-Id: Ie270f97f3d94c338ea3c84a712f8f4d43ffd36f4 Reviewed-on: https://code.wireshark.org/review/36115 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-13Introduce AudioCodes Debug Recording (ACDR) dissectorOrgad Shaneh1-0/+4
ACDR is a protocol over UDP that is used by AudioCodes devices for recording traffic to and from the device. It adds a header to each packet that contains extra data about the packet. For some packet types (like SIP), it also appends the IP and UDP/TCP headers of the sent/received packet. The dissector unwraps the ACDR header, and displays the packets with the original type (and when available, with the original addresses). Bug: 16275 Change-Id: I19ad90053a2ef73da80881dc5e94aa362de23ea3 Reviewed-on: https://code.wireshark.org/review/35417 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-02-11SIP:Add SIP Header P-Charge-Info RFC 8496Anders Broman1-205/+212
Change-Id: Ifcbf196c940734587ff771492df3f55a69c3d2d5 Reviewed-on: https://code.wireshark.org/review/36078 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-24SIP: share dissector status value_string array with tshark SIP statsMartin Mathieson1-7/+9
Change-Id: I8f12310f69aa5393ba8ad37e498845f2a1f17693 Reviewed-on: https://code.wireshark.org/review/35927 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-01-05SIP: authorization validation segfault on missing fieldserikdejong1-1/+2
Fix for segfaults caused by missing username and or realm fields when validating SIP authorization. Change-Id: Ia418f2a7f036ef706fcd6e4a766ea43098a6883d Reviewed-on: https://code.wireshark.org/review/35644 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-12-30SIP: RFC8688 Rejected Status CodeUli Heilmeier1-0/+1
Add support for RFC8688 A Session Initiation Protocol (SIP) Response Code for Rejected Calls Change-Id: I8471e62f9a428c731100940301d70af66095606b Reviewed-on: https://code.wireshark.org/review/35601 Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-11-18SIP: Handle "Authorization:" Header without data.Anders Broman1-31/+34
Change-Id: I42f5ea5f2b0b12fc5cfe6df37b6cec5c85e1eb60 Reviewed-on: https://code.wireshark.org/review/35123 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-26SIP: Ensure session-id is not emptyMichael Mann1-6/+14
Add expert info if session-id is empty. Bug: 15951 Change-Id: I48ffe4ca26fd94f522ad1a668c99ed8f1f5e2c01 Reviewed-on: https://code.wireshark.org/review/34356 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-05-08HTTP: fix bad reassembly with Content-Type and no Content-LengthPeter Wu1-1/+3
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>
2019-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-14/+14
Convert our various PROTO_ITEM_ macros to inline functions and document them. Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c Reviewed-on: https://code.wireshark.org/review/32706 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-27SIP: Add a preference to hide the generated/trace Call IDAnders Broman1-1/+13
Change-Id: Id936dfaa5278ce9f3bb62281497268fb4054fc56 Reviewed-on: https://code.wireshark.org/review/32579 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-23SDP: fix memleak of "trace_id"Peter Wu1-1/+1
The string value is stored in the conversation, so use file-scoped memory instead of g_strdup. Convert to union to save space. Bug: 15440 Change-Id: Ie2dabfc67ac1db1cc8f864601b8395dcdec7caf8 Fixes: v2.9.0rc0-2719-g8bd0616621 ("SDP: Show callid from all call legs with the same RTP cpnversation.") Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11845 Reviewed-on: https://code.wireshark.org/review/31704 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-23SDP: remove unused setup_proto field to fix memleaksPeter Wu1-1/+0
Bug: 15440 Change-Id: I2a543eef23e1b006928edef353e88b0612c5cdb7 Fixes: v2.9.0rc0-2676-gd68b7bc505 ("Add sip_call_id filter to RTP stream.") Fixes: v2.9.0rc0-2720-g228da02fda ("RTP: Restructure call id handling.") Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11845 Reviewed-on: https://code.wireshark.org/review/31701 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-22NGAP: Handle vnd.3gpp.ngap content-type (TS 39.502)Anders Broman1-1/+1
Change-Id: I35044ede286a2013ad04dc817892f9ff788da6a5 Reviewed-on: https://code.wireshark.org/review/31661 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-01Add a "failed" return for tap packet routines.Guy Harris1-3/+3
This allows taps that can fail to report an error and fail; a failed tap's packet routine won't be called again, so they don't have to keep track of whether they've failed themselves. We make the return value from the packet routine an enum. Don't have a separate type for the per-packet routine for "follow" taps; they're expected to act like tap packet routines, so just use the type for tap packet routines. One tap packet routine returned -1; that's not a valid return value, and wasn't one before this change (the return value was a boolean), so presume the intent was "don't redraw". Another tap routine's early return, without doing any work, returned TRUE; this is presumably an error (no work done, no need to redraw), so presumably it should be "don't redraw". Clean up some white space while we're at it. Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8 Reviewed-on: https://code.wireshark.org/review/31283 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-27Try to squeeze some bytes out of the frame_data structure.Guy Harris1-3/+3
Make the time stamp precision a 4-bit bitfield, so, when combined with the other bitfields, we have 32 bits. That means we put the flags at the same structure level as the time stamp precision, so they can be combined; that gets rid of an extra "flags." for references to the flags. Put the two pointers next to each other, and after a multiple of 8 bytes worth of other fields, so that there's no padding before or between them. It's still not down to 64 bytes, which is the next lower power of 2, so there's more work to do. Change-Id: I6f3e9d9f6f48137bbee8f100c152d2c42adb8fbe Reviewed-on: https://code.wireshark.org/review/31213 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-13SIP: Add the generated Call Id to the tree.Anders Broman1-0/+6
Change-Id: I0fd5aff70452062d24cc777c002b6d02f7c5a691 Reviewed-on: https://code.wireshark.org/review/31032 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-06SIP: Try to fix ASAN build crash.Anders Broman1-8/+8
Bug: 15328 Change-Id: Iefc057c74f234592adca1f7816a3e9fac99b48be Reviewed-on: https://code.wireshark.org/review/30937 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-05SIP: Use differtent hf variables for the "real" and generated Call-idAnders Broman1-2/+9
It's not allways good to pick up frames for related call legs when filtering. Make different hf:s for the two use cases. Change-Id: I33c640636a76173f3a7952f4a740491ccfac276d Reviewed-on: https://code.wireshark.org/review/30922 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-03SDP: Show callid from all call legs with the same RTP cpnversation.Anders Broman1-9/+9
Change-Id: If17732c2bd0b23e7f62b7464b9f154c317019f16 Reviewed-on: https://code.wireshark.org/review/30893 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-29Add sip_call_id filter to RTP stream.Anders Broman1-4/+12
Change-Id: Ia525fa74457eef03a3a8bc85905036c19693cfbb Reviewed-on: https://code.wireshark.org/review/30830 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-25Rename packet-ssl* to packet-tls*Gerald Combs1-1/+1
Rename packet-ssl{,-utils}.[ch] to packet-tls{,-utils}.[ch]. Change-Id: I4732162ec131ddf0734b3dd191ccc9e48a76ce06 Reviewed-on: https://code.wireshark.org/review/29659 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-03Free dynamic header fields on exitStig Bjørlykke1-41/+59
Put routine to free all dynamically registered header fields in the UAT reset callback to avoid ASAN report for memory leaks on exit. Handle duplicated entries without leaking memory. Call proto_free_deregistered_fields() in proto_cleanup() and move this after prefs_cleanup() to free the memory used in UATs. Change-Id: I96545177b5b23b9c20ad8e7751a0d5621c9ca10f Reviewed-on: https://code.wireshark.org/review/27907 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-13Get rid of some GTK+-only stuff.Guy Harris1-3/+3
Change-Id: I85806476246a567f747e3911e3d15716e9cfe06b Reviewed-on: https://code.wireshark.org/review/27514 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-05SIP: Fix handling of response timeUli Heilmeier1-0/+1
Set p_val->request_time when we set p_val->frame_number so that response time matches request frame. Bug: 14551 Change-Id: I5f8dd9405b9b1eb61a1ca184b15d3fdc436546e1 Reviewed-on: https://code.wireshark.org/review/26762 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-05SIP: Change filter Retry-After to an FT_UINT32AndersBroman1-1/+19
Change-Id: I745d0aa390b95d42ea9ed4ea645a157677bce948 Reviewed-on: https://code.wireshark.org/review/26753 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-09SIP: Add a filter for icid-value.AndersBroman1-0/+133
Change-Id: If049f0a86999ddaa23d4ad9ec8f6a4679c7623e2 Reviewed-on: https://code.wireshark.org/review/26387 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-19Get rid of more new_ prefixes for statistics functions and types.Guy Harris1-32/+32
There are no "old" versions of them that we're keeping around. Change-Id: I3c76a14d0ec1a06df39c547da37f4dea9987df4d Reviewed-on: https://code.wireshark.org/review/25892 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo1-1/+1
The first is deprecated, as per https://spdx.org/licenses/. Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed Reviewed-on: https://code.wireshark.org/review/25661 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-30SIP: Fixed matching of INVITE request to INVITE response.Robert Jongbloed1-7/+7
The sip_is_packet_resend() function sets the internal transaction_state to final_response_seen, the prevents the sip_find_request() from finding the matching INVITE as it expects transaction_state == request_seen. Simply reversing the order of these functions seems to fix the problem. Change-Id: I61d085c979dee24ad88b4eea26dfa002fd9cd213 Reviewed-on: https://code.wireshark.org/review/25429 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-15[SIP] Display tel uri in VoIP calls.AndersBroman1-3/+25
Change-Id: I0a4eb85abd75ed706ea519371f2c62b172c05297 Reviewed-on: https://code.wireshark.org/review/25326 Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-03[SIP] Use proto_tree_add_item_ret_string() to get the method string.Anders1-18/+5
Change-Id: I8c1933d17a613917c6b6482199949e103c3d1eaf Reviewed-on: https://code.wireshark.org/review/25112 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-19[SIP] Add dissection of oc-seq as time stamp.AndersBroman1-4/+29
Change-Id: I0273f8bff7693a7dc7416932649c083c360bc098 Reviewed-on: https://code.wireshark.org/review/24890 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-18[SIP] Make a filter for Overload Control Value.AndersBroman1-0/+15
Change-Id: I8ee552d331388a1fa748bff765afe5b53508f63f Reviewed-on: https://code.wireshark.org/review/24878 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-11SIP statistics: use flipped indices for tables when incrementing statsMartin Mathieson1-2/+2
Change-Id: I22ed38b1c2d7849e8930149fb39ee14fa198a6e1 Reviewed-on: https://code.wireshark.org/review/24771 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2017-12-11SIP statistics: fix problems with invalid itemsMartin Mathieson1-5/+9
Change-Id: Ide21489cad66e4bebaafe5ef813a000db2956a2e Reviewed-on: https://code.wireshark.org/review/24759 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-04Show retx prev and next framenum types as chevronsMartin Mathieson1-1/+1
Change-Id: I1641c70130a7562db9ea099770d8b5a7fe6e5532 Reviewed-on: https://code.wireshark.org/review/24676 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-24Fix registration of SIP atop SSL/TLS.Guy Harris1-1/+2
See https://ask.wireshark.org/questions/64151/sip-tls-is-only-shown-as-tcp. Change-Id: Ife182136601007ff6a5713666d9fada5abcd00b9 Reviewed-on: https://code.wireshark.org/review/24041 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-15Remove superfluous null-checks before strdup/freeAhmad Fatoum1-28/+5
NULL checks were removed for following free functions: - g_free "If mem is NULL it simply returns" https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html#g-free - g_slist_free(_full)? "NULL is considered to be the empty list" https://developer.gnome.org/glib/stable/glib-Singly-Linked-Lists.html - g_strfreev "If str_array is NULL, this function simply returns." https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strfreev - g_slice_free "If mem is NULL, this macro does nothing." https://developer.gnome.org/glib/stable/glib-Memory-Slices.html#g-slice-free - g_match_info_free "not NULL... otherwise does nothing" https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html#g-match-info-free - dfilter_free defined in Wireshark code. Returns early when passed NULL epan/dfilter/dfilter.c They were also removed around calls to g_strdup where applicable: - g_strdup "If str is NULL it returns NULL." https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strdup Change-Id: Ie80c2db89bef531edc3aed7b7c9f654e1d654d04 Reviewed-on: https://code.wireshark.org/review/23406 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>