summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-bgp.c
AgeCommit message (Collapse)AuthorFilesLines
2014-12-13Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-21/+21
(for some dissectors which fetch all other integral fields using ENC_BIG_ENDIAN). Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56 Reviewed-on: https://code.wireshark.org/review/5748 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-11BGP: add support of RFC6368 - Internal BGP as the Provider/Customer EdgeYann Lejeune1-0/+25
Protocol for BGP/MPLS IP Virtual Private Networks (VPNs). Bug: 10762 Change-Id: Ifbe2af639ee5a2d96ec3546708060cadcc349df2 Reviewed-on: https://code.wireshark.org/review/5664 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-11BGP: extract the bgp path attribute dissection to a dedicated function.Yann Lejeune1-668/+684
Change-Id: I228f1402007d8570bfdeb0105ce5e89c48357481 Reviewed-on: https://code.wireshark.org/review/5721 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-10Eliminate some proto_tree_add_text in packet-bgp.cMichael Mann1-102/+67
Change-Id: I05fabe9786125e2167fe4010733f61000d0e7914 Reviewed-on: https://code.wireshark.org/review/5670 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Matthieu Texier <matthieu@texier.tv> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-02Fix instances of duplicate display-filter-names with incompatible types.Bill Meier1-2/+2
Change-Id: I3b5afb8a59f6443624708b9fecfdcbe93dad59ef Note: Some of the filters, when/if used, could have caused Wireshark crashes. Reviewed-on: https://code.wireshark.org/review/5575 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-02BGP: Incorrect decoding AS numbers when mixed AS sizeMatthieu Texier1-7/+10
Fix AS Path Heuristic Issue reported by Jon Bug: 10742 Change-Id: Ie5e4108bd93464a2d1076dcc4f322171ea8e68cb Reviewed-on: https://code.wireshark.org/review/5564 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-01BGP: fix dissection of BGP community tagYann Lejeune1-6/+6
The offset used for BGP community tag dissection is a wrong one. Bug: 10746 Change-Id: I1d1d443568bb97a0b3b95a312762ac0a3102326a Reviewed-on: https://code.wireshark.org/review/5562 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-11-26Fix a number of dup hf[] filter-names probably resulting from cut/paste errs.Bill Meier1-1/+1
Change-Id: I9242300b2ace3155c1506b584a90f073100a305e Reviewed-on: https://code.wireshark.org/review/5512 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-26Remove the use of pinfo->private_data from dissectors that just save it to ↵Michael Mann1-7/+0
restore it. Change-Id: I13197cc48068bb35ee12a7023cfe5f76bbc4e264 Reviewed-on: https://code.wireshark.org/review/5486 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-19Do encoding-arg changes (all benign)Bill Meier1-15/+15
For: - FT_BYTES: Always use just ENC_NA - integral/floating (other than FT_[U]INT8): Do ENC_NA --> ENC_BIG_ENDIAN Also: - FT_UINT... --> FT_UINT8 in a few cases (to match proto_tree_add_item...) - Change one case of incorrect '||' to '|' Change-Id: I427e0e61618ff8faf55691c8a695930f67d455b0 Reviewed-on: https://code.wireshark.org/review/4184 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-12proto_tree_add_text cleanupMichael Mann1-156/+187
Create filters (expert and hf_) that have the "most bang for the buck" (ie have many instances for a single filter) Change-Id: I61995e41c5b298df77e084e65cdf30ebe95da1e6 Reviewed-on: https://code.wireshark.org/review/4086 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: Anders Broman <a.broman58@gmail.com>
2014-08-25BPG : issue with BGP AS path heuristic (AS_CONFED_SET)Matthieu Texier1-8/+17
Add also a expert info when unable determine ASN length (2 or 4 bytes) Bug: 10399 Change-Id: I24978e29e24f38c2e01e4b953a5a51496f0cf5a6 Reviewed-on: https://code.wireshark.org/review/3831 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-08-02Fix another (valid) complaint from the mac buildbotEvan Huus1-1/+1
What mystical new compiler upgrade is this? Change-Id: I89b3bfb53b9a19bbfb1cc8339d38cdc4a4652c62 Reviewed-on: https://code.wireshark.org/review/3347 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-01Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-1/+0
Change-Id: I847c7217b520a5f7ec581e6170fe3dc77c628e96 Reviewed-on: https://code.wireshark.org/review/3322 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29Bug 10302 - BGP attribute AIGP (draft-ietf-idr-aigp) not decoded - FixMatthieu Texier1-0/+56
Change-Id: Ib8b3c5666932777218e33b74cca33b791c883fc9 Reviewed-on: https://code.wireshark.org/review/3226 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-18Support of draft-ietf-idr-flow-spec-v6 and some cosmetic improvmentsMatthieu Texier1-17/+90
Change-Id: Ieaf23c84d67ccdfdcb167afb382c86797bc1cd2b Reviewed-on: https://code.wireshark.org/review/3006 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-22convert to proto_tree_add_subtree[_format]Michael Mann1-42/+31
Change-Id: Ib60ca75b7da8cfa21cfe2999c9b9448a02c332df Reviewed-on: https://code.wireshark.org/review/2560 Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_ensure_length_remaining -> ↵Michael Mann1-1/+1
tvb_ensure_captured_length_remaining" See https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 021e7afc9fcba09094d0e2143cc434a34e3b09dc. Change-Id: I0640eabce5ce8c4ff3a88ebf848b499f8bb8ed2f Reviewed-on: https://code.wireshark.org/review/2429 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_ensure_length_remaining -> tvb_ensure_captured_length_remainingDario Lombardo1-1/+1
Change-Id: I0228f3b6b7067bc0ce51f9d359f99fd18feb2b66 Reviewed-on: https://code.wireshark.org/review/2378 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-14Add support of RFC 6514 PMSI bgp attribute and tunnel ID decodingMatthieu Texier1-40/+297
Change-Id: Ia170002fb5af5f6548595688956cc01ec4a72298 Reviewed-on: https://code.wireshark.org/review/960 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-07(Benign) Don't use "address-of" operator on arg of VALS() (not that it makes ↵Bill Meier1-1/+1
any actual difference).. Change-Id: I0766d0f130648aaa5a58d9f4062fa24e898cbdc3 Reviewed-on: https://code.wireshark.org/review/545 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-03-06Ue TFS & VALS macros for certain 'fieldconvert' fields.Bill Meier1-1/+1
Change-Id: I8d7468e62d5de99eb68b554134be71b17d1b87c8 Reviewed-on: https://code.wireshark.org/review/525 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.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-25Enhance BGP DissectorMichael Pergament1-0/+387
Add * BGP MPLS Based Ethernet VPN dissector (draft-ietf-l2vpn-evpn-05) * PMSI Tunnel Attribut dissector (RFC6514) Change-Id: I02caa67fc371bbc9666f343e20fa678e8b029a59 Reviewed-on: https://code.wireshark.org/review/296 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-24Fix -Wunused-const-variable found by ClangAlexis La Goutte1-12/+0
Change-Id: I57cfafea0e3110553ef03a34baad217f8109942d Reviewed-on: https://code.wireshark.org/review/320 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-21Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-5/+0
Change-Id: Ic3a240a2e751700f653287dd84fe58016adab9e2 Reviewed-on: https://code.wireshark.org/review/297 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-21Moving custer list/cluster id attribut to itemsMatthieu Texier1-24/+12
Change-Id: If23c530b10c67613311aa8a8a1b1a8acf95f3c48 Reviewed-on: https://code.wireshark.org/review/294 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-20BGP : clean up of unused define and adding amount of ext-communities in ↵Matthieu Texier1-41/+1
community item Change-Id: I55793e522d0bdaee0f19ca020a8ef0097f5fb5f1 Reviewed-on: https://code.wireshark.org/review/255 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-19Fix incorrect definition and use of a val64_string which caused a crash.Bill Meier1-2/+2
Change-Id: Ib15ddef167c0e2af24938fc5bb68839eac65ca2c Reviewed-on: https://code.wireshark.org/review/258 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-17BGP : Update Capability CodesAlexis La Goutte1-31/+40
From IANA page: http://www.iana.org/assignments/capability-codes/capability-codes.xhtml Use decimal value (like iana page) Fix Dynamic Capability value... Change-Id: I9a6e672de840403943792b6ba4d913b186b1d09f Reviewed-on: https://code.wireshark.org/review/243 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-17Display the number of unknown BGP Path Attribut (use val_to_str)Alexis La Goutte1-1/+1
Change-Id: I6aed8ee3a92cc08aebfef58372285bed5a62e8bd Reviewed-on: https://code.wireshark.org/review/240 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-13Redesign of BGP ext-com in a separate function, alignement with RFC and ↵Matthieu Texier1-334/+744
IANA, use of items instead of add_text Change-Id: I4af2ee8e760aa80eeb28f71e93f8948ef5b26eb5 Reviewed-on: https://code.wireshark.org/review/95 Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
2014-02-03Fix all -fstrict-alias warnings found by gcc 4.1.2Gilbert Ramirez1-1/+1
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>
2014-01-27Fix: value string specified as a BASE_VAL64_STRING inBill Meier1-1/+1
an hf[] entry but defined as a 'value_string' intead of as a 'val64_string'. Caused 'tshark -G values' to crash (and presumably would also cause a crash when the value-string is referenced in a dissection): Introduced in svn #54728 (Note: There's still another 'tshark -G values' crash to to found & fixed) svn path=/trunk/; revision=54983
2014-01-13No reason for decode_bgp_rd()'s return value to be non-const, so make itGuy Harris1-2/+2
const. svn path=/trunk/; revision=54734
2014-01-13From Miroslav Miklus via ↵Alexis La Goutte1-1/+1664
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9504 Enhance BGP dissector : bgp-ls dissector (draft-ietf-idr-ls-distribution-04) BGPTYPE_LINK_STATE_ATTR is temporarily set to 99, would need change when IANA allocate a Path Attribute value for BGP-LS From me : * Fix indent * fix arg encoding (via encoding-args tools) svn path=/trunk/; revision=54728
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-1/+1
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-04From Matt TexierAlexis La Goutte1-53/+41
Enhance BGP Dissector : Communities Use proto_tree_add_item From me Missing space for well known community svn path=/trunk/; revision=53783
2013-11-18From Matt Texier Enhance BGP Dissector : AS_PATHAlexis La Goutte1-208/+238
Full rewrite of BGP AS_PATH attribut using items and a clearer (and documentated !) heuristic From me Fix indent svn path=/trunk/; revision=53419
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-09-12Convert a few more dissectors to wmemPascal Quantin1-178/+193
svn path=/trunk/; revision=51991
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-10/+10
svn path=/trunk/; revision=51852
2013-08-07Enhance BGP UpdateAlexis La Goutte1-10/+29
Step 4 : Convert proto_tree_add_text calls to proto_tree_add_item and use new name of RFC4271 ( Withdrawn Routes Length ...) svn path=/trunk/; revision=51184
2013-08-07From Matt TexierAlexis La Goutte1-141/+211
Enhance BGP Dissector Step 3 :Variable consistency and renaming, adding RFC and draft as comments (Preperation for next enhance...) From me : Fix some typo/whitespace Make checkhf happy... Signed-off-by: Alexis La Goutte <alexis.lagoutte@gmail.com> svn path=/trunk/; revision=51182
2013-07-26Enhance BGP Update (Path Attribute)Alexis La Goutte1-52/+41
Step 2 ! Make Path Attribute field filterable... svn path=/trunk/; revision=50918
2013-07-26Enhance BGP UpdateAlexis La Goutte1-234/+130
First step ! Remove ugly double switch(bgpa_type)... (use proto_item_append_text) svn path=/trunk/; revision=50917
2013-07-12From Matt Texier via ↵Alexis La Goutte1-205/+343
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8691 Improvement of previous support of RFC5575 BGP flow spec From me * Enhance and fix some display tree stuff * Add Matt to AUTHORS svn path=/trunk/; revision=50534
2013-07-09Batch of filterable expert infos.Michael Mann1-1/+3
svn path=/trunk/; revision=50454
2013-06-20From report of Alexander Okonnikov and Patch of Matt Texier via ↵Alexis La Goutte1-30/+78
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8802 Incorrect decoding of Layer2 Info Extended Community Within BGP Update message for BGP VPLS (RFC 4761) some parts of Extended Community "Layer2 Info" are incorrectly decoded: 1. Encapsulation - Unknown (0x13). Per RFC 4761 encap type 0x13 is "VPLS" (clause 3.2.4); 2. Control Flags - per RFC 4761 (clause 3.2.4) two least-significant bits (6 and 7) are defined as: "C" (bit 6, Control Word): value 1 - Control Word is required - and value 0 - Control Word is not required; decoding is correct (at least for value 0); "S" (bit 7, Sequence delivery): value 1 - Sequence delivery is required - and value 0 - Sequence delivery is not required; decoding is incorrect, because for value 0 (sequence delivery is not required) you provide description that "Sequence delivery is required". Also, there is description (at the same string) "F Flag (reserved) set. IETF document draft-ietf-l2vpn-vpls-multihoming (clause 3.3.1) updates RFC 4761 and defines two additional bits within Control Flags byte - D (bit 0, "Down") and F (bit 2, "Flush"). You provide description that "F Flag (reserved) set" when this flag actually is not set (value 0). Furthermore, you don't provide description about status of flag D (in attached dump in the first packet flag D is set and unset in the second packet). svn path=/trunk/; revision=50085