aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lisp.c
diff options
context:
space:
mode:
authorLorand Jakab <ljakab@ac.upc.edu>2018-06-08 14:08:46 +0200
committerAnders Broman <a.broman58@gmail.com>2018-06-08 13:28:29 +0000
commitbd2c4deb724022163000d6fc736480b7c0198ac0 (patch)
tree5e41031c137f371df5323ad9a315e6712338f61f /epan/dissectors/packet-lisp.c
parent99aeec08d0ebd0afbc07c04f9e61372cab4eb852 (diff)
LISP: Decode AFNUM_802 as AFNUM_EUI48
Some LISP implementations use the AFI value 6 (RFC 1700) for MAC addresses instead of AFI value 16389 (RFC 7042). This patch allows correct decoding of both. Change-Id: I12c3d6b90fd8a85911f76dec5448e6a2e237e797 Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu> Reviewed-on: https://code.wireshark.org/review/28115 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-lisp.c')
-rw-r--r--epan/dissectors/packet-lisp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/epan/dissectors/packet-lisp.c b/epan/dissectors/packet-lisp.c
index 8a2fc3ca7c..374056b67e 100644
--- a/epan/dissectors/packet-lisp.c
+++ b/epan/dissectors/packet-lisp.c
@@ -536,6 +536,7 @@ get_addr_str(tvbuff_t *tvb, gint offset, guint16 afi, guint16 *addr_len)
return wmem_strdup_printf(wmem_packet_scope(), "%s (ASN %d)", addr_str, asn);
}
return addr_str;
+ case AFNUM_802:
case AFNUM_EUI48:
*addr_len = EUI48_ADDRLEN;
addr_str = tvb_ether_to_str(tvb, offset);
@@ -780,6 +781,7 @@ dissect_lcaf_afi_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset = dissect_lcaf(tvb, pinfo, lisp_afi_list_tree, offset, tir);
remaining -= (offset - old_offset);
break;
+ case AFNUM_802:
case AFNUM_EUI48:
proto_tree_add_item(lisp_afi_list_tree, hf_lisp_lcaf_afi_list_mac, tvb, offset, EUI48_ADDRLEN, ENC_NA);
proto_item_append_text(tir, " %d. MAC Address: %s", i, tvb_ether_to_str(tvb, offset));
@@ -853,6 +855,7 @@ dissect_lcaf_iid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offse
case AFNUM_LCAF:
offset = dissect_lcaf(tvb, pinfo, tree, offset, NULL);
break;
+ case AFNUM_802:
case AFNUM_EUI48:
proto_tree_add_item(tree, hf_lisp_lcaf_iid_mac,
tvb, offset, EUI48_ADDRLEN, ENC_NA);
@@ -920,6 +923,7 @@ dissect_lcaf_asn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offse
case AFNUM_LCAF:
offset = dissect_lcaf(tvb, pinfo, tree, offset, NULL);
break;
+ case AFNUM_802:
case AFNUM_EUI48:
proto_tree_add_item(tree, hf_lisp_lcaf_asn_mac,
tvb, offset, EUI48_ADDRLEN, ENC_NA);
@@ -1082,6 +1086,7 @@ dissect_lcaf_geo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offse
case AFNUM_LCAF:
offset = dissect_lcaf(tvb, pinfo, tree, offset, NULL);
break;
+ case AFNUM_802:
case AFNUM_EUI48:
proto_tree_add_item(tree, hf_lisp_lcaf_geo_mac,
tvb, offset, EUI48_ADDRLEN, ENC_NA);
@@ -1224,6 +1229,7 @@ dissect_lcaf_nonce_loc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint
case AFNUM_LCAF:
offset = dissect_lcaf(tvb, pinfo, tree, offset, NULL);
break;
+ case AFNUM_802:
case AFNUM_EUI48:
proto_tree_add_item(tree, hf_lisp_lcaf_nonce_loc_mac,
tvb, offset, EUI48_ADDRLEN, ENC_NA);
@@ -1468,6 +1474,7 @@ dissect_lcaf_src_dst_key(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
case AFNUM_LCAF:
offset = dissect_lcaf(tvb, pinfo, src_tree, offset, NULL);
break;
+ case AFNUM_802:
case AFNUM_EUI48:
proto_tree_add_item(src_tree, hf_lisp_lcaf_srcdst_src_mac,
tvb, offset, EUI48_ADDRLEN, ENC_NA);
@@ -1506,6 +1513,7 @@ dissect_lcaf_src_dst_key(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
case AFNUM_LCAF:
offset = dissect_lcaf(tvb, pinfo, dst_tree, offset, NULL);
break;
+ case AFNUM_802:
case AFNUM_EUI48:
proto_tree_add_item(dst_tree, hf_lisp_lcaf_srcdst_dst_mac,
tvb, offset, EUI48_ADDRLEN, ENC_NA);
@@ -1615,6 +1623,7 @@ dissect_lcaf_kv_addr_pair(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
case AFNUM_LCAF:
offset = dissect_lcaf(tvb, pinfo, key_tree, offset, NULL);
break;
+ case AFNUM_802:
case AFNUM_EUI48:
proto_tree_add_item(key_tree, hf_lisp_lcaf_kv_key_mac,
tvb, offset, EUI48_ADDRLEN, ENC_NA);
@@ -1653,6 +1662,7 @@ dissect_lcaf_kv_addr_pair(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
case AFNUM_LCAF:
offset = dissect_lcaf(tvb, pinfo, value_tree, offset, NULL);
break;
+ case AFNUM_802:
case AFNUM_EUI48:
proto_tree_add_item(value_tree, hf_lisp_lcaf_kv_value_mac,
tvb, offset, EUI48_ADDRLEN, ENC_NA);
@@ -2027,6 +2037,7 @@ dissect_lisp_mapping(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree,
dissect_lcaf(tvb, pinfo, lcaf_prefix_tree, offset, NULL);
offset += addr_len;
break;
+ case AFNUM_802:
case AFNUM_EUI48:
proto_tree_add_item(lisp_mapping_tree, hf_lisp_mapping_eid_mac, tvb, offset, EUI48_ADDRLEN, ENC_NA);
offset += EUI48_ADDRLEN;
@@ -2170,6 +2181,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
dissect_lcaf(tvb, pinfo, lcaf_src_eid_tree, offset, NULL);
offset += addr_len;
break;
+ case AFNUM_802:
case AFNUM_EUI48:
proto_tree_add_item(lisp_tree,
hf_lisp_mreq_srceid_mac, tvb, offset, EUI48_ADDRLEN, ENC_NA);
@@ -2270,6 +2282,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
dissect_lcaf(tvb, pinfo, lcaf_prefix_tree, offset, NULL);
offset += addr_len;
break;
+ case AFNUM_802:
case AFNUM_EUI48:
proto_tree_add_item(lisp_record_tree, hf_lisp_mreq_record_prefix_mac, tvb, offset, EUI48_ADDRLEN, ENC_NA);
offset += EUI48_ADDRLEN;