diff options
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-rtps.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-rtps.h | 1 |
2 files changed, 8 insertions, 3 deletions
diff --git a/epan/dissectors/packet-rtps.c b/epan/dissectors/packet-rtps.c index c22ea0e3a3..cc238de4ea 100644 --- a/epan/dissectors/packet-rtps.c +++ b/epan/dissectors/packet-rtps.c @@ -7543,14 +7543,18 @@ static gboolean dissect_rtps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree int sub_hf; const value_string *sub_vals; endpoint_guid guid; - + guint32 magic_number; /* Check 'RTPS' signature: * A header is invalid if it has less than 16 octets */ if (!tvb_bytes_exist(tvb, offset, 16)) return FALSE; - if (tvb_get_ntohl(tvb, offset) != RTPS_MAGIC_NUMBER) - return FALSE; + + magic_number = tvb_get_ntohl(tvb, offset); + if (magic_number != RTPX_MAGIC_NUMBER && + magic_number != RTPS_MAGIC_NUMBER) { + return FALSE; + } /* Distinguish between RTPS 1.x and 2.x here */ majorRev = tvb_get_guint8(tvb,offset+4); if ((majorRev != 1) && (majorRev != 2)) diff --git a/epan/dissectors/packet-rtps.h b/epan/dissectors/packet-rtps.h index a8fbf5e3ec..77597cb5fb 100644 --- a/epan/dissectors/packet-rtps.h +++ b/epan/dissectors/packet-rtps.h @@ -111,6 +111,7 @@ typedef enum { } RTICdrTypeObjectTypeKind; #define RTPS_MAGIC_NUMBER 0x52545053 /* RTPS */ +#define RTPX_MAGIC_NUMBER 0x52545058 /* RTPX */ /* Traffic type */ #define PORT_BASE (7400) |