ISIS (LSP/HELLO): Add RFC 6119 (IPv6 Traffic Engineering in IS-IS)

Add new TLV 140 (IPv6 TE Router ID) and 233 (IPv6 Global Interface Address)
Add new sub TLV (for TLV 22, 141, 222) : 12 (IPv6 Global Interface) and 13 (IPv6 Neighbor Address)

Missing add new TLV 139 (IPv6 SRLG)

Ping-Bug: 15015
Change-Id: Ie106e56717d3698cd8608c3b0626854d462268d9
Reviewed-on: https://code.wireshark.org/review/29397
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Alexis La Goutte 2018-09-02 16:34:52 +02:00 committed by Anders Broman
parent 4168babb32
commit 42ad60896d
3 changed files with 120 additions and 2 deletions

View File

@ -48,6 +48,8 @@
#define ISIS_CLV_EXTD_IP_REACH 135 /* draft-ietf-isis-traffic-05 */
#define ISIS_CLV_HOSTNAME 137 /* rfc2763 */
#define ISIS_CLV_SHARED_RISK_GROUP 138 /* rfc5307 */
#define ISIS_CLV_IPV6_SRLG_TLV 139 /* rfc6119 */
#define ISIS_CLV_IPV6_TE_ROUTER_ID 140 /* rfc6119 */
#define ISIS_GRP_ADDR 142 /* rfc7176 */
#define ISIS_CLV_MT_PORT_CAP 143 /* rfc6165, rfc7176 */
#define ISIS_CLV_MT_CAP 144 /* rfc6329, rfc7176 */
@ -57,6 +59,7 @@
#define ISIS_CLV_MT_IS_REACH 222 /* draft-ietf-isis-wg-multi-topology-05 */
#define ISIS_CLV_MT_SUPPORTED 229 /* draft-ietf-isis-wg-multi-topology-05 */
#define ISIS_CLV_IP6_ADDR 232 /* draft-ietf-isis-ipv6-02 */
#define ISIS_CLV_IPV6_GBL_INT_ADDR 233 /* rfc6119 */
#define ISIS_CLV_MT_IP_REACH 235 /* draft-ietf-isis-wg-multi-topology-05 */
#define ISIS_CLV_IP6_REACH 236 /* draft-ietf-isis-ipv6-02 */
#define ISIS_CLV_MT_IP6_REACH 237 /* draft-ietf-isis-wg-multi-topology-05 */

View File

@ -124,6 +124,7 @@ static int hf_isis_hello_trill_hello_reduction = -1;
static int hf_isis_hello_trill_unassigned_1 = -1;
static int hf_isis_hello_trill_hop_by_hop_flags = -1;
static int hf_isis_hello_trill_unassigned_2 = -1;
static int hf_isis_hello_clv_ipv6_glb_int_addr = -1;
static gint ett_isis_hello = -1;
static gint ett_isis_hello_clv_area_addr = -1;
@ -151,6 +152,7 @@ static gint ett_isis_hello_clv_mt_port_cap_port_trill_ver = -1;
static gint ett_isis_hello_clv_mt_port_cap_vlans_appointed = -1;
static gint ett_isis_hello_clv_trill_neighbor = -1;
static gint ett_isis_hello_clv_checksum = -1;
static gint ett_isis_hello_clv_ipv6_glb_int_addr = -1;
static expert_field ei_isis_hello_short_packet = EI_INIT;
static expert_field ei_isis_hello_long_packet = EI_INIT;
@ -918,6 +920,30 @@ dissect_hello_padding_clv(tvbuff_t *tvb _U_, packet_info* pinfo _U_, proto_tree
/* nothing to do here! */
}
/*
* Name: dissect_hello_ipv6_glb_int_addr_clv()
*
* Description:
* Decode for a hello packets ipv6 gobal interface addr clv. Calls into the
* clv 233.
*
* Input:
* tvbuff_t * : tvbuffer for packet data
* proto_tree * : proto tree to build on (may be null)
* int : current offset into packet data
* int : length of IDs in packet.
* int : length of this clv
*
* Output:
* void, will modify proto_tree if not null.
*/
static void
dissect_hello_ipv6_glb_int_addr_clv(tvbuff_t *tvb, packet_info* pinfo,
proto_tree *tree, int offset, int id_length _U_, int length)
{
isis_dissect_ipv6_int_clv(tree, pinfo, tvb, &ei_isis_hello_short_packet,
offset, length, hf_isis_hello_clv_ipv6_glb_int_addr );
}
static const isis_clv_handle_t clv_l1_hello_opts[] = {
{
ISIS_CLV_AREA_ADDRESS,
@ -1003,6 +1029,12 @@ static const isis_clv_handle_t clv_l1_hello_opts[] = {
&ett_isis_hello_clv_checksum,
dissect_hello_checksum_clv
},
{
ISIS_CLV_IPV6_GBL_INT_ADDR,
"IPv6 Global Interface Address",
&ett_isis_hello_clv_ipv6_glb_int_addr,
dissect_hello_ipv6_glb_int_addr_clv
},
{
0,
"",
@ -1084,6 +1116,12 @@ static const isis_clv_handle_t clv_l2_hello_opts[] = {
&ett_isis_hello_clv_checksum,
dissect_hello_checksum_clv
},
{
ISIS_CLV_IPV6_GBL_INT_ADDR,
"IPv6 Global Interface Address",
&ett_isis_hello_clv_ipv6_glb_int_addr,
dissect_hello_ipv6_glb_int_addr_clv
},
{
0,
"",
@ -1171,6 +1209,12 @@ static const isis_clv_handle_t clv_ptp_hello_opts[] = {
&ett_isis_hello_clv_checksum,
dissect_hello_checksum_clv
},
{
ISIS_CLV_IPV6_GBL_INT_ADDR,
"IPv6 Global Interface Address",
&ett_isis_hello_clv_ipv6_glb_int_addr,
dissect_hello_ipv6_glb_int_addr_clv
},
{
0,
"",
@ -1434,6 +1478,11 @@ proto_register_isis_hello(void)
{ &hf_isis_hello_trill_hop_by_hop_flags, { "Hop-by-hop Extended Header Flags", "isis.hello.trill.hop_by_hop_flags", FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), 0x1ffc0000, NULL, HFILL }},
{ &hf_isis_hello_trill_unassigned_2, { "Unassigned", "isis.hello.trill.unassigned_2",FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x0003ffff, NULL, HFILL }},
{ &hf_isis_hello_is_neighbor, { "IS Neighbor", "isis.hello.is_neighbor", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
/* rfc6119 */
{ &hf_isis_hello_clv_ipv6_glb_int_addr,
{ "IPv6 Global interface address", "isis.hello.clv_ipv6_glb_int_addr",
FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
};
static gint *ett[] = {
@ -1462,7 +1511,8 @@ proto_register_isis_hello(void)
&ett_isis_hello_clv_mt_port_cap_port_trill_ver,
&ett_isis_hello_clv_mt_port_cap_vlans_appointed,
&ett_isis_hello_clv_trill_neighbor,
&ett_isis_hello_clv_checksum
&ett_isis_hello_clv_checksum,
&ett_isis_hello_clv_ipv6_glb_int_addr /* CLV 233, rfc6119 */
};
static ei_register_info ei[] = {

View File

@ -380,6 +380,9 @@ static int hf_isis_lsp_expense = -1;
static int hf_isis_lsp_expense_support = -1;
static int hf_isis_lsp_error = -1;
static int hf_isis_lsp_error_support = -1;
static int hf_isis_lsp_clv_ipv6_te_router_id = -1;
static int hf_isis_lsp_ext_is_reachability_ipv6_interface_address = -1;
static int hf_isis_lsp_ext_is_reachability_ipv6_neighbor_address = -1;
static gint ett_isis_lsp = -1;
static gint ett_isis_lsp_info = -1;
@ -444,6 +447,7 @@ static gint ett_isis_lsp_clv_originating_buff_size = -1; /* CLV 14 */
static gint ett_isis_lsp_sl_flags = -1;
static gint ett_isis_lsp_sl_sub_tlv = -1;
static gint ett_isis_lsp_sl_sub_tlv_flags = -1;
static gint ett_isis_lsp_clv_ipv6_te_router_id = -1;
static expert_field ie_isis_lsp_checksum_bad = EI_INIT;
static expert_field ei_isis_lsp_short_packet = EI_INIT;
@ -2737,6 +2741,12 @@ dissect_sub_clv_tlv_22_22_23_141_222_223(tvbuff_t *tvb, packet_info* pinfo, prot
case 11:
dissect_subclv_unrsv_bw(tvb, subtree, sub_tlv_offset+13+i);
break;
case 12:
proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_ipv6_interface_address, tvb, sub_tlv_offset+13+i, 16, ENC_NA);
break;
case 13:
proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_ipv6_neighbor_address, tvb, sub_tlv_offset+13+i, 16, ENC_NA);
break;
case 18:
proto_tree_add_item(subtree, hf_isis_lsp_ext_is_reachability_traffic_engineering_default_metric,
tvb, sub_tlv_offset+13+i, 3, ENC_BIG_ENDIAN);
@ -3064,6 +3074,31 @@ dissect_lsp_prefix_neighbors_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *
}
}
/*
* Name: dissect_lsp_ipv6_te_router_id()
*
* Description: Decode an IPv6 TE Router ID CLV - code 140.
*
* Calls into the clv common one.
*
* Input:
* tvbuff_t * : tvbuffer for packet data
* proto_tree * : proto tree to build on (may be null)
* int : current offset into packet data
* int : length of IDs in packet.
* int : length of this clv
*
* Output:
* void, will modify proto_tree if not null.
*/
static void
dissect_lsp_ipv6_te_router_id_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset,
int id_length _U_, int length)
{
isis_dissect_ipv6_int_clv(tree, pinfo, tvb, &ei_isis_lsp_short_packet, offset, length,
hf_isis_lsp_clv_ipv6_te_router_id );
}
static const isis_clv_handle_t clv_l1_lsp_opts[] = {
{
ISIS_CLV_AREA_ADDRESS,
@ -3215,6 +3250,12 @@ static const isis_clv_handle_t clv_l1_lsp_opts[] = {
&ett_isis_lsp_clv_grp_address,
dissect_isis_grp_address_clv
},
{
ISIS_CLV_IPV6_TE_ROUTER_ID,
"IPv6 TE Router ID",
&ett_isis_lsp_clv_ipv6_te_router_id,
dissect_lsp_ipv6_te_router_id_clv
},
{
0,
"",
@ -3380,6 +3421,12 @@ static const isis_clv_handle_t clv_l2_lsp_opts[] = {
&ett_isis_lsp_clv_rt_capable,
dissect_isis_rt_capable_clv
},
{
ISIS_CLV_IPV6_TE_ROUTER_ID,
"IPv6 TE Router ID",
&ett_isis_lsp_clv_ipv6_te_router_id,
dissect_lsp_ipv6_te_router_id_clv
},
{
0,
"",
@ -4840,6 +4887,23 @@ proto_register_isis_lsp(void)
FT_BOOLEAN, 8, TFS(&tfs_metric_supported_not_supported), 0x80,
NULL, HFILL }
},
/* rfc6119 */
{ &hf_isis_lsp_clv_ipv6_te_router_id,
{ "IPv6 TE Router ID", "isis.lsp.clv_ipv6_te_router_id",
FT_IPv6, BASE_NONE, NULL, 0x0,
"IPv6 Traffic Engineering Router ID", HFILL }
},
{ &hf_isis_lsp_ext_is_reachability_ipv6_interface_address,
{ "IPv6 interface address", "isis.lsp.ext_is_reachability.ipv6_interface_address",
FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_ext_is_reachability_ipv6_neighbor_address,
{ "IPv6 neighbor address", "isis.lsp.ext_is_reachability.ipv6_neighbor_address",
FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
};
static gint *ett[] = {
&ett_isis_lsp,
@ -4904,7 +4968,8 @@ proto_register_isis_lsp(void)
&ett_isis_lsp_clv_sr_alg,
&ett_isis_lsp_sl_flags,
&ett_isis_lsp_sl_sub_tlv,
&ett_isis_lsp_sl_sub_tlv_flags
&ett_isis_lsp_sl_sub_tlv_flags,
&ett_isis_lsp_clv_ipv6_te_router_id /* CLV 140, rfc6119 */
};
static ei_register_info ei[] = {