aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-isakmp.c
AgeCommit message (Collapse)AuthorFilesLines
2024-01-30ISAKMP: add parse auth_method and proto for China IPSec VPN specificationzhilei zhang1-4/+42
China IPSec VPN specification use value 10 for auth_method and value 128 for pyload type
2023-11-22isakmp: update dh_group value_string with RFC8031 and RFC9385Alexis La Goutte1-0/+4
Add new following dh group : 31 Curve25519 [RFC8031] 32 Curve448 [RFC8031] 33 GOST3410_2012_256 [RFC9385] 34 GOST3410_2012_512 [RFC9385] https://www.iana.org/assignments/ikev2-parameters/ikev2-parameters.xhtml#ikev2-parameters-8
2023-11-20Remove init of proto variablesStig Bjørlykke1-365/+365
Remove init of proto, header field, expert info and subtree variables. This will reduces the binary size by approximate 1266320 bytes due to using .bss to zero-initialize the fields. The conversion is done using the tools/convert-proto-init.py script.
2023-11-18dissectors: Remove init of hf and ett variable arraysStig Bjørlykke1-8/+8
Manually remove init of hf and ett variable arrays because this cannot be easily done using the convert script.
2023-11-08Start to check range_stringsMartin Mathieson1-1/+1
2023-11-10Fix some spelling errorsMartin Mathieson1-1/+1
2023-11-02ISAKMP: Update value strings from IANA registry.Anders Broman1-2/+34
2023-09-29tvbuff: support endianness setting for packed BCDMartin Kaiser1-3/+3
ENC_BCD_DIGITS_0_9 and other encodings for packed BCD values are hard-wired to little endian for multi-byte fields. Some dissectors like zvt work around this by calling tvb_get_bcd_string and proto_tree_add_string. The mdb protocol is also using multi-byte packed BCD fields in big-endian order. This patch allows setting ENC_BIG_ENDIAN or ENC_LITTLE_ENDIAN in combination with the BCD encodings. Unfortunately, we have to default to big endian and fix up all existing users.
2023-09-24epan: Convert the UAT API to C99 typesGerald Combs1-2/+2
Ping #19116
2023-05-28Label vs filter checkingMartin Mathieson1-1/+1
2023-05-19Fix some more item lengths vs callsMartin Mathieson1-2/+2
2023-04-13ISAKMP: fix dissection of DEVIVE_IDENTITY identity typePascal Quantin1-1/+1
The encoding is in big endian and not little endian (the type is in the 2 LSB).
2022-10-04ISAKMP: Add IKEv2 notification (Private) type for Auto Discovery and Network ↵Alexis La Goutte1-2/+14
Overlay ID (Fortinet)
2022-09-28ISKAMP: Add VID Auto-Discovery Sender (Fortinet)Alexis La Goutte1-0/+6
2022-09-10ISAKMP: Add some Fortinet (VID)Alexis La Goutte1-0/+12
* Auto-Discovery Receiver (Fortinet) * Exchange Interface IP (Fortinet)
2022-07-30Add China IPSec Algorithms and IKE AttributesLiangYuxuan1-1/+40
2022-04-21libgcrypt: Remove HAVE_GCRYPT_AEAD , _CHACHA20John Thacker1-39/+0
Libgcrypt 1.8.0 is required now, so these are always defined.
2022-04-20libgcrypt: Require version 1.8.0John Thacker1-0/+3
Libgcrypt 1.8.x is required for a large amount of decryption support and is the current LTS version of libgcrypt. The 1.6 and 1.7 series have been end-of-life since 2017-06-30 and 2019-06-30, respectively. The Linux distributions that have versions of libgcrypt before 1.8.0 are nearing or at end of support (RHEL7, SLES 12, Debian stretch, Ubuntu 16.04LTS) and can be supported by the Wireshark 3.6 LTS release series. Remove an enormous amount of ifdefs based on libgcrypt versions 1.6.0, 1.7.0, and 1.8.0. There will be a second pass for the commons defines HAVE_LIBGCRYPT_AEAD, HAVE_LIBGCRYPT_CHACHA20, and HAVE_LIBGCRYPT_CHACHA20_POLY1305, which are now always defined. The ISAKMP dissector has some comments noting that some workarounds were used for libgcrypt 1.6 that aren't needed with 1.7; perhaps that could be updated now.
2022-02-15Tools: Fix fix-encoding-args.pl ASCII string validationJoão Valverde1-3/+3
Do not require a useless ENC_NA parameter for string encodings. FT_STRING and FT_STRINGZ types don't have any ndianness. Follow-up to 6ec429622c9258eefd388caf21ce92ab5b9f54b4.
2022-01-18EAP: Adding EAP-IKEv2 supportDr. Lars Völker1-4/+8
This patch adds basic EAP-IKEv2 support. This does not include EAP-IKEv2 fragmentation support.
2022-01-02Add support for some additional Cisco IKEv2 VIDsSamuel D. Leslie1-1/+14
- CISCO-DYNAMIC-ROUTE Indicates support for IKEv2 Dynamic Routing - CISCO-VPN-REV-02 Not so sure about this one. Presumably indicates to peers internal differences in the IKE implementation which can influence subsequent configuration of the security associations.
2021-12-19Replace g_strdup_printf() with ws_strdup_printf()João Valverde1-9/+9
Use macros from inttypes.h.
2021-12-19Replace g_snprintf() with snprintf() (dissectors)João Valverde1-9/+9
Use macros from inttypes.h with format strings.
2021-10-07to_str: scope tvb_ip6_to_strEvan Huus1-3/+3
2021-10-07to_str: scope tvb_ip_to_strEvan Huus1-3/+3
2021-07-21First pass pinfo->pool conversion, part 2Evan Huus1-26/+26
Automated find/replace of wmem_packet_scope() with pinfo->pool in all files where it didn't cause a build failure.
2021-03-25wsutils: add local implementation of g_memdup2.Dario Lombardo1-10/+10
g_memdup() was deprecated and replaced with g_memdup2() in GLib 2.68, we provide our own copy of g_memdup2() for older GLib versions.
2021-03-16ISAKMP: Pad Length field is 1 byte longPascal Quantin1-1/+1
2021-02-12ISKAMP: fix a REPORT_DISSECTOR_BUG printfPascal Quantin1-1/+1
2020-10-11check_tfs.py: Also match case insensitivelyMartin Mathieson1-5/+1
Fix up some issues where the words were the same except for captitalisation.
2020-08-31More spelling fixes, part 2 of 2nd pass of dissectors.Martin Mathieson1-1/+1
2020-08-29Fix more spelling errors in dissector strings.Martin Mathieson1-2/+2
A second batch of spelling errors, detected using a script that uses pyspellcheck and a Wireshark-specific dictionary file. I will take at least one more pass through the dissectors, as further improvements are made to the script.
2020-08-11wsutil: define HAVE_LIBGCRYPT_AEAD in wsutil/wsgcrypt.h.Guy Harris1-3/+0
It's used in a number of source files; don't force each of them to test GCRYPT_VERSION_NUMBER independently. Make sure every file that uses HAVE_LIBGCRYPT_AEAD includes wsutil/wsgcrypt.h. Also do some other definitions that are based on the libgcrypt version there as well. This requires that the Qt UI code be given the include directory for libgcrypt, as the follow stream code includes epan/dissectors/packet-quic.h, which includes wsutil/wsgcrypt.h to get HAVE_LIBGCRYPT_AEAD defined, and wsutil/wsgcrypt.h includes <gcrypt.h>. Change-Id: I9cb50f411f5b2b6b9e28a38bfd901f4a66d9cc8f Reviewed-on: https://code.wireshark.org/review/38116 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <gharris@sonic.net>
2020-08-07Find and fix dissectors that should be using a default tfs.Martin Mathieson1-7/+4
Found using tools/check_tfs.py, included in this commit. Here are the reports that were fixed here: Examining: All dissector modules epan/dissectors/packet-assa_r3.c tfs_mortisepins_flags - could have used tfs_high_low from tfs.c instead: {High,Low} epan/dissectors/packet-btle.c tfs_present_bit - could have used tfs_present_not_present from tfs.c instead: {Present,Not Present} epan/dissectors/packet-dhcp.c tfs_fqdn_s - could have used tfs_server_client from tfs.c instead: {Server,Client} epan/dissectors/packet-docsis-macmgmt.c mdd_tfs_on_off - could have used tfs_on_off from tfs.c instead: {On,Off} epan/dissectors/packet-docsis-macmgmt.c mdd_tfs_en_dis - could have used tfs_enabled_disabled from tfs.c instead: {Enabled,Disabled} epan/dissectors/packet-docsis-macmgmt.c req_not_req_tfs - could have used tfs_requested_not_requested from tfs.c instead: {Requested,Not Requested} epan/dissectors/packet-docsis-tlv.c on_off_tfs - could have used tfs_on_off from tfs.c instead: {On,Off} epan/dissectors/packet-docsis-tlv.c activation_tfs - could have used tfs_active_inactive from tfs.c instead: {Active,Inactive} epan/dissectors/packet-docsis.c ena_dis_tfs - could have used tfs_enabled_disabled from tfs.c instead: {Enabled,Disabled} epan/dissectors/packet-ecmp.c tfs_not_expected_expected - could have used tfs_odd_even from tfs.c instead: {Odd,Even} epan/dissectors/packet-erf.c erf_link_status_tfs - could have used tfs_up_down from tfs.c instead: {Up,Down} epan/dissectors/packet-h263.c on_off_flg - could have used tfs_on_off from tfs.c instead: {On,Off} epan/dissectors/packet-h263.c cpm_flg - could have used tfs_on_off from tfs.c instead: {On,Off} epan/dissectors/packet-interlink.c flags_set_notset - could have used tfs_set_notset from tfs.c instead: {Set,Not set} epan/dissectors/packet-ip.c tos_set_low - could have used tfs_low_normal from tfs.c instead: {Low,Normal} epan/dissectors/packet-ip.c tos_set_high - could have used tfs_high_normal from tfs.c instead: {High,Normal} epan/dissectors/packet-isakmp.c flag_r - could have used tfs_response_request from tfs.c instead: {Response,Request} epan/dissectors/packet-isis-lsp.c tfs_metric_supported_not_supported - could have used tfs_no_yes from tfs.c instead: {No,Yes} epan/dissectors/packet-kerberos.c supported_tfs - could have used tfs_supported_not_supported from tfs.c instead: {Supported,Not supported} epan/dissectors/packet-kerberos.c set_tfs - could have used tfs_set_notset from tfs.c instead: {Set,Not set} epan/dissectors/packet-mac-lte.c mac_lte_scell_status_vals - could have used tfs_activated_deactivated from tfs.c instead: {Activated,Deactivated} epan/dissectors/packet-p_mul.c no_yes - could have used tfs_no_yes from tfs.c instead: {No,Yes} epan/dissectors/packet-pgm.c opts_present - could have used tfs_present_not_present from tfs.c instead: {Present,Not Present} epan/dissectors/packet-rsl.c rsl_ms_fpc_epc_mode_vals - could have used tfs_inuse_not_inuse from tfs.c instead: {In use,Not in use} epan/dissectors/packet-sita.c tfs_sita_on_off - could have used tfs_on_off from tfs.c instead: {On,Off} epan/dissectors/packet-vines.c tfs_vine_rtp_no_yes - could have used tfs_no_yes from tfs.c instead: {No,Yes} epan/dissectors/packet-vnc.c button_mask_tfs - could have used tfs_pressed_not_pressed from tfs.c instead: {Pressed,Not pressed} 27 issues found Change-Id: I7e53b491f20289955c9e9caa8357197d9010a5aa Reviewed-on: https://code.wireshark.org/review/38087 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-1/+1
The static arrays are supposed to be arrays of const pointers to int, not arrays of non-const pointers to const int. Fixing that means some bugs (scribbling on what's *supposed* to be a const array) will be caught (see packet-ieee80211-radiotap.c for examples, the first of which inspired this change and the second of which was discovered while testing compiles with this change), and removes the need for some annoying casts. Also make some of those arrays static while we're at it. Update documentation and dissector-generator tools. Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc Reviewed-on: https://code.wireshark.org/review/37517 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-04-27Add string encoding values for various BCD encodings, and use them.Guy Harris1-7/+3
Add some ENC_ values for various flavors of packed BCD, and use that instead of explicitly calling tvb_bcd_dig_to_wmem_packet_str() and adding the result. Change-Id: I07511d9d09c9231b610c121cd6ffb3b16fb017a9 Reviewed-on: https://code.wireshark.org/review/36952 Reviewed-by: Guy Harris <gharris@sonic.net>
2020-04-25Introduce tfs_get_string helperJaap Keuter1-5/+5
true_false_strings have no helper function to properly retrieve the string representing the true or false value, much like unit_strings, even though this is not uncommon in dissectors. This change introduces the helper function and modifies the dissectors, so that they use this helper i.s.o. their own expressions. Change-Id: I477ed2d90a9a529fc5dcfef7e3ea42ec180d27ae Reviewed-on: https://code.wireshark.org/review/36920 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-25isakmp: clean up EMERGENCY_CALL_NUMBER dissection.Guy Harris1-31/+9
Don't use hf_text_only. For the protocol tree items that are just subtrees, use proto_tree_add_subtree(); for the emergency call numbers, give them real FT_STRING fields, using tvb_bcd_dig_to_wmem_packet_str(). Change-Id: I721271e26502abce8d8ce2375fc0916c0de586e6 Reviewed-on: https://code.wireshark.org/review/36928 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <gharris@sonic.net>
2020-04-13Standardise IETF RFC and Draft URLs in dissectors.Martin Mathieson1-4/+4
Prefer: - html (rather than txt) - https Also includes the script check_dissector_urls.py, that can be used to find links in code and test them. Change-Id: Iafd8bb8948674a38ad5232bf5b5432ffb2b1251b Reviewed-on: https://code.wireshark.org/review/36821 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-04-03isakmp: fix typo found by range_string checkingAlexis La Goutte1-1/+0
Notify Message Type (isakmp.notify.msgtype) hidden by earlier entry (prev=RESERVED: 15 -> 16) (this=RESERVED: 15 -> 16) Change-Id: I3a371587f203ff845ff3f0c9c52a4e6feb714f92 Reviewed-on: https://code.wireshark.org/review/36680 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-02-03ISAKMP: Critical flag should not be in proposals and transformsDr. Lars Völker1-1/+2
IKEv2 added the critical flag to all payloads except payloads and transforms. The dissection code just checked that it was looking at IKEv1 but missed a check for proposals and transforms. Bug: 16364 Change-Id: Ia9297af039fddf2da81f9712fdf7ac165fb2d86d Signed-off-by: Dr. Lars Völker <lars.voelker@technica-engineering.de> Reviewed-on: https://code.wireshark.org/review/36009 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-01-15ISAKMP: Dissect ID data types also for GDOI SA TEKUli Heilmeier1-87/+66
Dissect all kinds of ID types also for GDOI SA TEK payload. Bug: 16233 Change-Id: I4583fed5d9b01ec13f971fbbf79b3053d3355951 Reviewed-on: https://code.wireshark.org/review/35811 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-25ISAKMP: fix dissection of SA TEK payload for non IP addressPascal Quantin1-2/+2
Bug: 16229 Change-Id: I09220be32251b72ca5ef0475ce35b291ce3635c9 Reviewed-on: https://code.wireshark.org/review/35207 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-09-13ISAKMP: Added support for Notify AUTH_LIFETIME PayloadMichail Koreshkov1-0/+22
As specified in RFC4478 Change-Id: Ic15d1f553bd9c2a25a91a6d329fe9eb0daf35a3b Reviewed-on: https://code.wireshark.org/review/34498 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-30isakmp: Fix Dead StoreAlexis La Goutte1-2/+0
Fix dead store (Dead assignement/Dead increment) Warning found by Clang Change-Id: I318fec3f9cf8d86eaa4260f00e8747683a049e6e Reviewed-on: https://code.wireshark.org/review/34407 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-08-26ISAKMP: Correct typos in new GDOI fieldsMichael Mann1-3/+3
Change-Id: I29872cb116dfc66c93d59b51a44161e627d3cfec Reviewed-on: https://code.wireshark.org/review/34363 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-08-26ISAKMP: added support for GDOIGandharav Katyal1-64/+262
Bug: 15693 Change-Id: I790da95c1fa64596bd5131b491237fa084c0be49 Reviewed-on: https://code.wireshark.org/review/33382 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-04-24ISAKMP: Added dissection of digital signature authenticationDr. Lars Voelker1-7/+52
RFC7427 describes the Digital Signature Authentication for IKEv2. This consists of the Signature Hash Algo Notify and a new format of the authentication data. The Notify was already present. This patch only adds the capability to parse the new format of the authentication data. Change-Id: Id1949397c1a2caa9898ecf44ecd580b5417d3343 Signed-off-by: Dr. Lars Voelker <lars-github@larsvoelker.de> Reviewed-on: https://code.wireshark.org/review/32913 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-23ISAKMP: Fix duplicated-branches warningUli Heilmeier1-3/+1
Fix duplicated-branches warning. Change-Id: I01f88fc7b232807f648428126d1aed3f8e7657ca Reviewed-on: https://code.wireshark.org/review/32939 Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>