Improve r36177 per Guy's suggestion at bug #5746 to always call the
authorsfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 12 Mar 2011 02:06:25 +0000 (02:06 +0000)
committersfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 12 Mar 2011 02:06:25 +0000 (02:06 +0000)
PPP-over-HDLC dissector since it will do the check for us to see if
the HDLC framing is present or not.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36178 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-sflow.c

index c433d803fb9973e6f3259e4c4016c62fa99239f4..792f43fbb2c8dd73ed6c7392d89330adfade0020 100644 (file)
@@ -682,7 +682,6 @@ static dissector_handle_t tr_handle;
 static dissector_handle_t fddi_handle;
 static dissector_handle_t fr_handle;
 static dissector_handle_t x25_handle;
-static dissector_handle_t ppp_handle;
 static dissector_handle_t ppp_hdlc_handle;
 static dissector_handle_t smds_handle;
 static dissector_handle_t aal5_handle;
@@ -802,10 +801,7 @@ dissect_sflow_245_sampled_header(tvbuff_t *tvb, packet_info *pinfo,
                 call_dissector(x25_handle, next_tvb, pinfo, sflow_245_header_tree);
                 break;
             case SFLOW_245_HEADER_PPP:
-                if (tvb_memeql(tvb, offset, "\xff\x03", 2) == 0)
-                    call_dissector(ppp_hdlc_handle, next_tvb, pinfo, sflow_245_header_tree);
-                else
-                    call_dissector(ppp_handle, next_tvb, pinfo, sflow_245_header_tree);
+                call_dissector(ppp_hdlc_handle, next_tvb, pinfo, sflow_245_header_tree);
                 break;
             case SFLOW_245_HEADER_SMDS:
                 call_dissector(smds_handle, next_tvb, pinfo, sflow_245_header_tree);
@@ -3408,7 +3404,6 @@ proto_reg_handoff_sflow_245(void) {
         fddi_handle = find_dissector("fddi");
         fr_handle = find_dissector("fr");
         x25_handle = find_dissector("x.25");
-        ppp_handle = find_dissector("ppp");
         ppp_hdlc_handle = find_dissector("ppp_hdlc");
 #if 0
         smds_handle = find_dissector("smds");
@@ -3456,7 +3451,6 @@ proto_reg_handoff_sflow_245(void) {
         fddi_handle = data_handle;
         fr_handle = data_handle;
         x25_handle = data_handle;
-        ppp_handle = data_handle;
         ppp_hdlc_handle = data_handle;
         smds_handle = data_handle;
         aal5_handle = data_handle;