btsmp: Put <none> in COL_INFO when having no keys
authorStig Bjørlykke <stig@bjorlykke.org>
Fri, 5 Jan 2018 08:58:39 +0000 (09:58 +0100)
committerStig Bjørlykke <stig@bjorlykke.org>
Fri, 5 Jan 2018 09:47:23 +0000 (09:47 +0000)
Change-Id: If2db9fa1894f586523df882dca224b3b7b0eecb0
Reviewed-on: https://code.wireshark.org/review/25153
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
epan/dissectors/packet-btsmp.c

index 1d2e4e99cc1831aa83046e2c10edc4a17798aeb9..5a2f691f2e68f03685736bda9ac275152b679581 100644 (file)
@@ -223,7 +223,7 @@ dissect_btsmp_key_dist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
     value = tvb_get_guint8(tvb, offset);
 
     if (value & 0x01) {
-        col_append_sep_str(pinfo->cinfo, COL_INFO, "", "LTK");
+        col_append_str(pinfo->cinfo, COL_INFO, "LTK");
         next = TRUE;
     }
     if (value & 0x02) {
@@ -238,8 +238,12 @@ dissect_btsmp_key_dist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
         col_append_sep_str(pinfo->cinfo, COL_INFO, next ? ", " : "", "Linkkey");
         next = TRUE;
     }
-    if (value & 0xF0)
+    if (value & 0xF0) {
         col_append_sep_str(pinfo->cinfo, COL_INFO, next ? ", " : "", "Reserved");
+    }
+    if (!next) {
+        col_append_str(pinfo->cinfo, COL_INFO, "<none>");
+    }
 
     return offset + 1;
 }