aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-isakmp.c
AgeCommit message (Collapse)AuthorFilesLines
2015-06-28ISAKMP: consistently use two-space indentation (as per modelines). Also ↵Martin Mathieson1-1065/+1055
added one missing break Change-Id: I26f03b56765ffd69dab53988c8e35c7cf3f99f16 Reviewed-on: https://code.wireshark.org/review/9193 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-23ISAKMP: fix Cisco fragmentation support.Martin Mathieson1-3/+3
Last flag wasn't mapping to 'more fragments' properly, and reassembly should only be attempted on the last frame. Bug: 7940 Change-Id: I565f2b72b6eb68dc32e0f57a43a098a8f203a800 Reviewed-on: https://code.wireshark.org/review/9073 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-06-06ISAKMP: fix dissection when building with libgcryptPascal Quantin1-1/+2
Regression introduced in gb5b3a6b Change-Id: I26b9d703a40ca92703fd3e2a749386996667ea4c Reviewed-on: https://code.wireshark.org/review/8795 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-06ISAKMP: Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-1/+1
Change-Id: I06d09d5d0d54c96e18d9b423999cb309559612dd Reviewed-on: https://code.wireshark.org/review/8784 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-04ISAKMP: fix build about unused variableAlexis La Goutte1-1/+1
Change-Id: Id55eeb6d4c29088dec97b270aca61f8c5d777a46 Reviewed-on: https://code.wireshark.org/review/8752 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-03ISAKMP: Don't complain about zero-length config attributes in request ↵Martin Mathieson1-26/+30
messages - this is expected Change-Id: I1cedb7d84ca7e4c2af30405f5624a327fd796c86 Reviewed-on: https://code.wireshark.org/review/8739 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-06-02ISAKMP: do not try to defragment IKEv1 packetsPascal Quantin1-2/+4
Bug: 11242 Change-Id: I289a5eeb056822299f6cb436047418aec785dca5 Reviewed-on: https://code.wireshark.org/review/8728 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-05-29ISAKMP: fix compilation without libgcryptPascal Quantin1-1/+6
Change-Id: Ie0d9cc3d81b57f81fe50791bf0c5762578a22b19 Reviewed-on: https://code.wireshark.org/review/8692 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-29ISAKMP: fix some compilation warningsPascal Quantin1-2/+2
Change-Id: If682a12e057f35991893db18dc5e6c4df5434973 Reviewed-on: https://code.wireshark.org/review/8690 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-29ISAKMP: implement RFC7383: Internet Key Exchange Protocol Version 2 (IKEv2) ↵Martin Mathieson1-53/+279
Message Fragmentation Change-Id: Ib6660e245729bf9d4399fa8aa1858877ec3244da Reviewed-on: https://code.wireshark.org/review/8685 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-05-22ISAKMP: Add recent notify message types to range_string, and show names in ↵Martin Mathieson1-1/+12
notification root node Change-Id: I3849868f6fbc8c5243757f6a39806365ca7a3609 Reviewed-on: https://code.wireshark.org/review/8587 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-04-22Fix length calculation of IKEv2 REDIRECT notify with nonce dataTobias Brunner1-1/+1
Change-Id: Ia20569e89c3ae1d9ccdec73cc25c622e64117536 Reviewed-on: https://code.wireshark.org/review/8166 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-18Make UAT record update callbacks return a success/failure indication.Guy Harris1-11/+14
Have them return TRUE on success and FALSE on failure. Check the return value rather than whether the error string pointer is null or not. Change-Id: I800a03bcd70a6bbb7b217cf7c4800e9cdcf2189c Reviewed-on: https://code.wireshark.org/review/7222 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-21isakmp: col_...() shouldn't be called under 'if (tree)'Bill Meier1-1/+1
Change-Id: I6fa497ca99e2ad3b675697fd28eeafd61190a17c Reviewed-on: https://code.wireshark.org/review/6726 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-16SE_COPY_ADDRESS -> WMEM_COPY_ADDRESSMichael Mann1-1/+1
Copy addresses with wmem-scope instead of (forced) seasonal scope. All existing instances were converted to wmem_file_scope, but the flexibility is there for other scopes. Change-Id: I8e58837b9ef574ec7dd87e278470d7063ae8c1c2 Reviewed-on: https://code.wireshark.org/review/6564 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-13UAT error string pointers should not be const pointers.Guy Harris1-2/+2
UAT error strings are usually allocated by g_strdup() or g_strdup_printf(), and must ultimately be freed by the caller. Make the pointer-to-error-string-pointer arguments to various functions be "char **", not "const char **". Fix cases that finds where a raw string was being used, as that won't work if you try to free it; g_strdup() it instead. Add a missing free of an error string. Remove some no-longer-necessary casts. Remove some unnecessary g_strdup()s (the string being handed to it was already g_malloc()ated). Change some variable declarations to match. Put in XXX comments for some cases where the error string is just freed, without being shown to the user. Change-Id: I40297746a2ef729c56763baeddbb0842386fa0d0 Reviewed-on: https://code.wireshark.org/review/6525 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-08bytes_to_ep_str -> bytes_to_strMichael Mann1-1/+1
Change-Id: Ifcda8328dedec0ef4104c3a124d6246f99493750 Reviewed-on: https://code.wireshark.org/review/6389 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-07tvb_bytes_to_ep_str -> tvb_bytes_to_strMichael Mann1-2/+2
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4 Reviewed-on: https://code.wireshark.org/review/6371 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-6/+3
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-02Eliminate proto_tree_add_text from several dissectors.Michael Mann1-36/+40
Change-Id: I6d3125f15d268edd47ef74dd655eb86cb25ee52d Reviewed-on: https://code.wireshark.org/review/5047 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-08-05fix a warning with gcc 4.7.2 on linuxMartin Kaiser1-1/+1
packet-isakmp.c: In function 'dissect_isakmp': packet-isakmp.c:1873:6: error: 'ivd' may be used uninitialized in this function [-Werror=maybe-uninitialized] packet-isakmp.c:1747:14: note: 'ivd' was declared here cc1: all warnings being treated as errors (not sure why the compiler complains here) Change-Id: I9b9589d3193b0dc37f2db8f6c4c6727b2a92eaaa Reviewed-on: https://code.wireshark.org/review/3444 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05Do various minor dissector changes:Bill Meier1-2151/+2151
- remove unneeded initializers; - replace tabs in files with editor mode line 'expandtabs'; - col_set_str() --> col_add_str() (in one case); - tvb_length() -- > tvb_reported_length() (in one case); - do some whitespace & indentation fixes/changes. Change-Id: Ib8ffbbcdb6e4a74c0df6021a75430ae1ef9ae089 Reviewed-on: https://code.wireshark.org/review/3435 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-29proto_tree_add_subtree[_format]Michael Mann1-3/+3
Change-Id: I7e016f10fcfdc0523bf2fe8c11295c0334f7c332 Reviewed-on: https://code.wireshark.org/review/2694 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-20Cleanup display filters reported by checkfiltername.plMichael Mann1-7/+7
Also ensured some files have their correct names at the top so they are more easily grepped Change-Id: Ib0f5ddf14eb1616a93dee496107dc0eb09048825 Reviewed-on: https://code.wireshark.org/review/2452 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-3/+3
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-3/+3
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-13/+13
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-17isakmp: add support for IKEv1 AES decryptionAlex Badea1-0/+15
Select an appropriate gcrypt cipher based on ISAKMP encryption ID and key length attribute. Fixes bug 10128. Bug:10128 Change-Id: Ie74fc51eb9bfe6d68340056d3ef2ef28c7677fb8 Signed-off-by: Alex Badea <abadea@ixiacom.com> Reviewed-on: https://code.wireshark.org/review/2296 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-17isakmp: allow IKEv1 decryption with non-PSK authenticationAlex Badea1-1/+0
There is a check that disables decryption for non-PSK authentication. It has been around ever since its introduction in commit acfe071e (svn r17229). As suggested in bug 7951, remove this check to allow decryption for e.g. certificates authentication. Bug: 7951 Change-Id: I5e98407d0f8dbabac2cdaf632cf0af403192872b Signed-off-by: Alex Badea <abadea@ixiacom.com> Reviewed-on: https://code.wireshark.org/review/2297 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-16isakmp: support decryption for SHA-2 hash algorithmsAlex Badea1-0/+9
Simply map ISAKMP hash IDs for sha256, sha384 and sha512 to gcrypt MDs. Fixes bug 10181. Change-Id: I9c8265bf3c5c8f8d2fd6d251cc0f267964e3be8e Signed-off-by: Alex Badea <abadea@ixiacom.com> Reviewed-on: https://code.wireshark.org/review/2250 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-1/+1
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-28Minor: use VALS macro (as per convention); Add editor modelines; Do ↵Bill Meier1-2/+2
whitespace changes. Change-Id: I6007c1b2098d06e4a892474dd07f06a7538f94ef Reviewed-on: https://code.wireshark.org/review/1843 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-05-08Fix a whitespace after IKE_AUTHAlexis La Goutte1-1/+1
Change-Id: Id58da1f546ee5dff72cbc1bc012095ad0b9a9be5 Reviewed-on: https://code.wireshark.org/review/1562 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-08Remove trailing whitespaceMartin Mathieson1-2/+1
Change-Id: Idf8f9aba4e020a278e7b779de13ecdbcfcc39776 Reviewed-on: https://code.wireshark.org/review/1560 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-05-08Prettify a little, by showing ike2 flag values in flag root, and showing MID ↵Martin Mathieson1-2/+15
and flags in Info column Change-Id: I70884c933b3d82dfb7168352c5bed925f7e89e11 Reviewed-on: https://code.wireshark.org/review/1554 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-24Use correct hash algorithms in ISAKMP (IKEv2) dissectorTobias Brunner1-2/+2
Change-Id: Ia448f3cc5f5ffc8eafad73fdb0c3f3dd647342ef Reviewed-on: https://code.wireshark.org/review/335 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-22Add some simple ISAKMP heuristicsEvan Huus1-8/+31
Hopefully fixes bug 9800. Change-Id: I69e1a0e39763a6e25eb18aed6b4a6a6217e22d14 Reviewed-on: https://code.wireshark.org/review/312 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-03Fix all -fstrict-alias warnings found by gcc 4.1.2Gilbert Ramirez1-2/+2
The majority of the fixes are for calls to uat_new(). Instead of having each caller cast its private data to (void**), we use void* in the uat_new() API itself. Inside uat_new(), we cast the void* to void**. Some dissectors use val64_string arrays, so a VALS64() macro was added for those, to avoid using VALS(), which is useful only for value_string arrays. packet-mq.c was changed because dissect_nt_sid() requires a char**, not a guint**. All other callers of dissect_nt_sid() use char*'s (and take the address of it) for their local storage. So, this was changed to follow the other practices. A confusion between gint and absolute_time_display_e in packet-time.c was cleared up. The ugliest fix is the addition of ip6_guint8_to_str(), for exactly one caller. The caller uses one type of ip6 address byte array, while ip6_to_str() expects another. This new function is in place until the various address implementations can be consolidated. Add VALS64() to the developer documentation. Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805 Reviewed-on: https://code.wireshark.org/review/48 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2013-12-21Add missing includesJakub Zawadzki1-0/+1
svn path=/trunk/; revision=54332
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-3/+3
obvious that the returned string is ephemeral, and opens up the original names in the API for versions that take a wmem pool (and thus can work in any scope). svn path=/trunk/; revision=54249
2013-12-15Fix [-Wmissing-prototypes]Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54135
2013-12-14Fix some trivial warnings.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=54085
2013-10-29Mark an unused parameter as suchMartin Mathieson1-1/+1
svn path=/trunk/; revision=52971
2013-10-29Remove no-longer-used parameter.Jeff Morriss1-6/+6
svn path=/trunk/; revision=52965
2013-10-29Remove use of pinfo->private_dataMichael Mann1-55/+42
svn path=/trunk/; revision=52963
2013-10-25Add a very small hack to make the UAT update callback error string freeable, andEvan Huus1-9/+9
convert all existing UAT update callbacks to use glib memory instead of ephemeral memory for that string. UAT code paths are entirely distinct from packet dissection, so using ephemeral memory was the wrong choice, because there was no guarantees about when it would be freed. The move away from emem still needs to be propogated deeper into the UAT code itself at some point. Net effect: remove another bunch of emem calls from dissectors, where replacing with wmem would have caused assertions. svn path=/trunk/; revision=52854
2013-10-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-0/+4
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-1/+1
svn path=/trunk/; revision=52591
2013-09-29Convert several proto_tree_add_bytes_format calls to ↵Michael Mann1-2/+2
proto_tree_add_bytes_format_value. svn path=/trunk/; revision=52272