diameter: remove message length limiter
RFC 6733, ch3. specifies message length field as three octets and indicates the length of the Diameter message including headers and padding. Change-Id: I73694a085bbafb3ae280e02fa4c9e26868b31f76 Reviewed-on: https://code.wireshark.org/review/30772 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
8915deaef3
commit
c71f4d0888
|
@ -1441,7 +1441,6 @@ get_diameter_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb,
|
|||
static gint
|
||||
check_diameter(tvbuff_t *tvb)
|
||||
{
|
||||
guint32 diam_len;
|
||||
guint8 flags;
|
||||
|
||||
/* Ensure we don't throw an exception trying to do these heuristics */
|
||||
|
@ -1452,14 +1451,6 @@ check_diameter(tvbuff_t *tvb)
|
|||
if (tvb_get_guint8(tvb, 0) != 1)
|
||||
return NOT_DIAMETER;
|
||||
|
||||
/* Check if the message size is reasonable.
|
||||
* Diameter messages can technically be of any size; this limit
|
||||
* is just a practical one (feel free to tune it).
|
||||
*/
|
||||
diam_len = tvb_get_ntoh24(tvb, 1);
|
||||
if (diam_len > 65534)
|
||||
return NOT_DIAMETER;
|
||||
|
||||
/* Diameter minimum message length:
|
||||
*
|
||||
* Version+Length - 4 bytes
|
||||
|
@ -1474,7 +1465,7 @@ check_diameter(tvbuff_t *tvb)
|
|||
*
|
||||
* --> 36 bytes
|
||||
*/
|
||||
if (diam_len < 36)
|
||||
if (tvb_get_ntoh24(tvb, 1) < 36)
|
||||
return NOT_DIAMETER;
|
||||
|
||||
flags = tvb_get_guint8(tvb, 4);
|
||||
|
|
Loading…
Reference in New Issue