Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] [PATCH] [ISUP] Certain ISUP messages are reported as malformed

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Martin van der Werff" <martin@xxxxxxxxxxxxxxx>
Date: Thu, 1 Jul 2004 22:45:03 +0200
Hi,

ISUP messages without parameters like BLO, BLA and UBL are incorrectly
reported as malformed. The patch below fixes this problem. It also renames
the protocol to ISUP as this looks better in the default layout.

Regards, Martin.


--- packet-isup.c.prev 2004-04-04 21:53:40.000000000 +0200
+++ packet-isup.c 2004-06-27 11:35:32.968750000 +0200
@@ -5215,7 +5215,8 @@

    tap_queue_packet(isup_tap, pinfo, &tap_rec);

-   bufferlength = tvb_ensure_length_remaining(message_tvb, offset);
+   // bufferlength = tvb_ensure_length_remaining(message_tvb, offset); // MvdW: Messages without parameters (eg BLO) have no
remaining length.
+   bufferlength = tvb_length_remaining(message_tvb, offset);           //       Don't use the ensure variant of
tvb_length_remaining
    parameter_tvb = tvb_new_subset(message_tvb, offset, bufferlength, bufferlength);

    /* distinguish between message types:*/
@@ -5440,7 +5441,7 @@

 /* Make entries in Protocol column and Info column on summary display */
  if (check_col(pinfo->cinfo, COL_PROTOCOL))
-  col_set_str(pinfo->cinfo, COL_PROTOCOL, "ISUP (ITU)");
+  col_set_str(pinfo->cinfo, COL_PROTOCOL, "ISUP");

 /* Extract message type field */
  message_type = tvb_get_guint8(tvb, CIC_OFFSET + CIC_LENGTH);
@@ -5455,7 +5456,7 @@
  if (check_col(pinfo->cinfo, COL_INFO))
  {
   if (isup_show_cic_in_info)
-   col_add_fstr(pinfo->cinfo, COL_INFO, "%s(CIC %u) ", val_to_str(message_type, isup_message_type_value_acro, "reserved"), cic);
+   col_add_fstr(pinfo->cinfo, COL_INFO, "%s (CIC %u) ", val_to_str(message_type, isup_message_type_value_acro, "reserved"), cic);
   else
    col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_type, isup_message_type_value_acro, "reserved"));
  }
@@ -5524,7 +5525,7 @@

 /* Make entries in Protocol column and Info column on summary display */
  if (check_col(pinfo->cinfo, COL_PROTOCOL))
-  col_append_str(pinfo->cinfo, COL_PROTOCOL, "/ISUP(ITU)");
+  col_append_str(pinfo->cinfo, COL_PROTOCOL, "/ISUP");

 /* Extract message type field */
  message_type = tvb_get_guint8(tvb, 0);