On Thu, Oct 16, 2003 at 09:08:15AM +0200, [EMAIL PROTECTED] wrote:
> Next patch for GTP: it merges two dissectors (gtpv0, gtpv1) into one: gtp. 

In "dissect_gtp()", there's a big section

        if (tree) {

                ...

        }

that sets "offset", and, then, after it, there's a section that does

        if ((gtp_hdr.message == GTP_MSG_TPDU) && gtp_tpdu) {

                if (gtp_prime)
                        offset = 6;
                else
                if (gtp_version == 1) {
                        if (gtp_hdr.flags & 0x07)  {
                                if (tvb_get_guint8 (tvb, offset - 1))
                                        offset = 11;    /* if next_hdr != 0 */
                                else
                                        offset = 12;
                        }
                        else 
                                offset = 8;
                }
                else
                        offset = 20;

which depends on "offset" already being set, with the "tvb_get_guint8()"
call; however, it's only going to be set if "tree" is non-null.

Reply via email to