BGP: Add support of Vendor Capability 131 (Multisession Cisco)

Issue reported by Garri Djavadyan

Change-Id: I6dd4bd20d82a3f2cb8aa45f740f72d33e33053da
Ping-Bug:12604
Reviewed-on: https://code.wireshark.org/review/16374
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Alexis La Goutte 2016-07-10 19:27:47 +02:00 committed by Michael Mann
parent 393207582f
commit f2584b230a
1 changed files with 18 additions and 0 deletions

View File

@ -158,6 +158,7 @@ static dissector_handle_t bgp_handle;
#define BGP_CAPABILITY_FQDN 73 /* draft-walton-bgp-hostname-capability */
#define BGP_CAPABILITY_ROUTE_REFRESH_CISCO 128 /* Cisco */
#define BGP_CAPABILITY_ORF_CISCO 130 /* Cisco */
#define BGP_CAPABILITY_MULTISESSION_CISCO 131 /* Cisco */
#define BGP_ORF_PREFIX_CISCO 0x80 /* Cisco */
#define BGP_ORF_COMM_CISCO 0x81 /* Cisco */
@ -1155,6 +1156,7 @@ static const value_string capability_vals[] = {
{ BGP_CAPABILITY_FQDN, "FQDN Capability" },
{ BGP_CAPABILITY_ROUTE_REFRESH_CISCO, "Route refresh capability (Cisco)" },
{ BGP_CAPABILITY_ORF_CISCO, "Cooperative route filtering capability (Cisco)" },
{ BGP_CAPABILITY_MULTISESSION_CISCO, "Multisession BGP Capability (Cisco)" },
{ 0, NULL }
};
@ -1359,6 +1361,7 @@ static int hf_bgp_cap_fqdn_hostname_len = -1;
static int hf_bgp_cap_fqdn_hostname = -1;
static int hf_bgp_cap_fqdn_domain_name_len = -1;
static int hf_bgp_cap_fqdn_domain_name = -1;
static int hf_bgp_cap_multisession_flags = -1;
/* BGP update global header field */
static int hf_bgp_update_withdrawn_routes_length = -1;
@ -5456,6 +5459,18 @@ dissect_bgp_capability_item(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
}
}
break;
case BGP_CAPABILITY_MULTISESSION_CISCO:
if (clen < 1) {
expert_add_info_format(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u too short, must be greater than 1", clen);
proto_tree_add_item(cap_tree, hf_bgp_cap_unknown, tvb, offset, clen, ENC_NA);
offset += clen;
}
else {
proto_tree_add_item(cap_tree, hf_bgp_cap_multisession_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
}
break;
/* unknown capability */
default:
@ -7615,6 +7630,9 @@ proto_register_bgp(void)
{ &hf_bgp_cap_fqdn_domain_name,
{ "Domain Name", "bgp.cap.orf.fqdn.domain_name", FT_STRING, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
{ &hf_bgp_cap_multisession_flags,
{ "Flag", "bgp.cap.multisession.flags", FT_UINT8, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
/* BGP update */
{ &hf_bgp_update_withdrawn_routes_length,