nas_5gs: fix ifdefs in nas_5gs_mm_message_type_vals.
authorDario Lombardo <lomato@gmail.com>
Thu, 14 Jun 2018 15:38:51 +0000 (17:38 +0200)
committerAnders Broman <a.broman58@gmail.com>
Thu, 14 Jun 2018 17:30:48 +0000 (17:30 +0000)
The command tshark -G values gave the error:

** (process:26713): WARNING **: Extended value string 'nas_5gs_mm_message_type_vals' forced to fall back to linear search:

that caused regression tests to fail.

Fixes: v2.9.0rc0-947-g587b5a7.
Change-Id: I6c8b8c7e93838f407a363390ba2385603dc62338
Reviewed-on: https://code.wireshark.org/review/28270
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
epan/dissectors/packet-nas_5gs.c

index b519f2ca8d9995f3da9a3a92fd50389dd569e7fd..0310531d77e1a3d2fb9089c3234e6d59475d9e2c 100644 (file)
@@ -3408,13 +3408,6 @@ static const value_string nas_5gs_mm_message_type_vals[] = {
     { 0x58,    "Authentication reject"},
     { 0x59,    "Authentication failure"},
 
-    { 0x5a,    "Identity request" },
-    { 0x5b,    "Identity response" },
-    { 0x5c,    "Security mode command" },
-    { 0x5d,    "Security mode complete" },
-    { 0x5e,    "Security mode reject" },
-
-    { 0x5f,    "Not used in v 0.4.0" },
 #ifdef NAS_V_2_0_0
     { 0x5a,    "Authentication result"},
     { 0x5b,    "Identity request"},
@@ -3423,6 +3416,13 @@ static const value_string nas_5gs_mm_message_type_vals[] = {
     { 0x5e,    "Security mode complete"},
     { 0x5f,    "Security mode reject"},
 #else
+    { 0x5a,    "Identity request" },
+    { 0x5b,    "Identity response" },
+    { 0x5c,    "Security mode command" },
+    { 0x5d,    "Security mode complete" },
+    { 0x5e,    "Security mode reject" },
+
+    { 0x5f,    "Not used in v 0.4.0" },
     { 0x60,    "Not used in v 0.4.0" },
     { 0x61,    "Not used in v 0.4.0" },
     { 0x62,    "Not used in v 0.4.0" },
@@ -3439,7 +3439,7 @@ static const value_string nas_5gs_mm_message_type_vals[] = {
     { 0x66,    "DL NAS transport"},
     { 0x67,    "UL NAS transport"},
 #endif
-{ 0,    NULL }
+    { 0,    NULL }
 };
 
 static value_string_ext nas_5gs_mm_msg_strings_ext = VALUE_STRING_EXT_INIT(nas_5gs_mm_message_type_vals);