forked from osmocom/wireshark
Handle, in the Q.931 heuristic dissector, the case where TPKT isn't
enabled. Fix comments to explain that a return of -1 from "dissect_tpkt_header()" means "TPKT wasn't enabled". svn path=/trunk/; revision=3200
This commit is contained in:
parent
c00e9c43dc
commit
e8775b6c34
|
@ -2,7 +2,7 @@
|
|||
* Routines for Q.931 frame disassembly
|
||||
* Guy Harris <guy@alum.mit.edu>
|
||||
*
|
||||
* $Id: packet-q931.c,v 1.26 2001/03/28 07:49:39 guy Exp $
|
||||
* $Id: packet-q931.c,v 1.27 2001/03/28 08:06:06 guy Exp $
|
||||
*
|
||||
* Modified by Andreas Sikkema for possible use with H.323
|
||||
*
|
||||
|
@ -2197,6 +2197,12 @@ q931_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
return FALSE;
|
||||
|
||||
lv_tpkt_len = dissect_tpkt_header( tvb, &offset, pinfo, tree );
|
||||
if (lv_tpkt_len == -1) {
|
||||
/*
|
||||
* TPKT isn't enabled.
|
||||
*/
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if it's an empty TPKT message (the next one might be a
|
||||
|
|
|
@ -86,8 +86,8 @@ is_tpkt( tvbuff_t *tvb, unsigned int* offset )
|
|||
* Dissect the TPKT header; called from the TPKT dissector, as well as
|
||||
* from dissectors such as the dissector for Q.931-over-TCP.
|
||||
*
|
||||
* Returns -1 if we didn't dissect it as a TPKT header, otherwise returns
|
||||
* the PDU length from the TPKT header.
|
||||
* Returns -1 if TPKT isn't enabled, otherwise returns the PDU length
|
||||
* from the TPKT header.
|
||||
*
|
||||
* Sets "*offset" to the offset following the TPKT header.
|
||||
*/
|
||||
|
|
|
@ -35,8 +35,8 @@ gboolean is_tpkt( tvbuff_t *tvb, unsigned int* offset );
|
|||
* Dissect the TPKT header; called from the TPKT dissector, as well as
|
||||
* from dissectors such as the dissector for Q.931-over-TCP.
|
||||
*
|
||||
* Returns -1 if we didn't dissect it as a TPKT header, otherwise returns
|
||||
* the PDU length from the TPKT header.
|
||||
* Returns -1 if TPKT isn't enabled, otherwise returns the PDU length
|
||||
* from the TPKT header.
|
||||
*
|
||||
* Sets "*offset" to the offset following the TPKT header.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue