Text   |  XML   |  ReML   |   Visible Warnings:

Ignored Return Value  at packet-bgp.c:2725

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

dissect_bgp_pdu

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-bgp.c)expand/collapse
Show more  
 2713  dissect_bgp_pdu(tvbuff_t *volatile tvb, packet_info *pinfo, proto_tree *tree,
 2714      gboolean first)
 2715  {
 2716      guint16       bgp_len;       /* Message length             */
 2717      guint8        bgp_type;      /* Message type               */
 2718      const char    *typ;          /* Message type (string)      */
 2719      proto_item    *ti;           /* tree item                        */
 2720      proto_tree    *bgp_tree;     /* BGP packet tree                  */
 2721      proto_tree    *bgp1_tree;    /* BGP message tree                 */
 2722   
 2723      bgp_len = tvb_get_ntohs(tvb, BGP_MARKER_SIZE);
 2724      bgp_type = tvb_get_guint8(tvb, BGP_MARKER_SIZE + 2);
 2725      typ = val_to_str(bgp_type, bgptypevals, "Unknown message type (0x%02x)");
 2726   
 2727      if (check_col(pinfo->cinfo, COL_INFO)) {
 2728          if (first)
 2729              col_add_str(pinfo->cinfo, COL_INFO, typ);
 2730          else 
 2731              col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", typ);
 2732      }
 2733   
 2734      if (tree) {
 2735          ti = proto_tree_add_item(tree, proto_bgp, tvb, 0, -1, FALSE);
 2736          bgp_tree = proto_item_add_subtree(ti, ett_bgp);
 2737   
 2738          ti = proto_tree_add_text(bgp_tree, tvb, 0, -1, "%s", typ);
 2739   
 2740          /* add a different tree for each message type */
 2741          switch (bgp_type) {
 2742          case BGP_OPEN:
 2743              bgp1_tree = proto_item_add_subtree(ti, ett_bgp_open);
 2744              break;
 2745          case BGP_UPDATE:
 2746              bgp1_tree = proto_item_add_subtree(ti, ett_bgp_update);
 2747              break;
 2748          case BGP_NOTIFICATION:
 2749              bgp1_tree = proto_item_add_subtree(ti, ett_bgp_notification);
 2750              break;
 2751          case BGP_KEEPALIVE:
 2752              bgp1_tree = proto_item_add_subtree(ti, ett_bgp);
 2753              break;
 2754          case BGP_ROUTE_REFRESH_CISCO:
 2755          case BGP_ROUTE_REFRESH:
 2756              bgp1_tree = proto_item_add_subtree(ti, ett_bgp_route_refresh);
 2757              break;
 2758          case BGP_CAPABILITY:
 2759              bgp1_tree = proto_item_add_subtree(ti, ett_bgp_capability);
 2760              break;
 2761          default:
 2762              bgp1_tree = proto_item_add_subtree(ti, ett_bgp);
 2763              break;
 2764          }
 2765   
 2766          proto_tree_add_text(bgp1_tree, tvb, 0, BGP_MARKER_SIZE,
 2767                              "Marker: 16 bytes");
 2768   
 2769          if (bgp_len < BGP_HEADER_SIZE || bgp_len > BGP_MAX_PACKET_SIZE) {
 2770              proto_tree_add_text(bgp1_tree, tvb, BGP_MARKER_SIZE, 2,
 2771                                  "Length (invalid): %u byte%s", bgp_len,
 2772                                  plurality(bgp_len, "", "s"));
 2773              return;
 2774          } else {
 2775              proto_tree_add_text(bgp1_tree, tvb, BGP_MARKER_SIZE, 2,
 2776                                  "Length: %u byte%s", bgp_len,
 2777                                  plurality(bgp_len, "", "s"));
 2778          }
 2779   
 2780          proto_tree_add_uint(bgp1_tree, hf_bgp_type, tvb,
 2781                                     BGP_MARKER_SIZE + 2, 1,
 2782                                     bgp_type);
 2783   
 2784          switch (bgp_type) {
 2785          case BGP_OPEN:
 2786              dissect_bgp_open(tvb, bgp1_tree);
 2787              break;
 2788          case BGP_UPDATE:
 2789              dissect_bgp_update(tvb, bgp1_tree);
 2790              break;
 2791          case BGP_NOTIFICATION:
 2792              dissect_bgp_notification(tvb, bgp1_tree);
 2793              break;
 2794          case BGP_KEEPALIVE:
 2795              /* no data in KEEPALIVE messages */
 2796              break;
 2797          case BGP_ROUTE_REFRESH_CISCO:
 2798          case BGP_ROUTE_REFRESH:
 2799              dissect_bgp_route_refresh(tvb, bgp1_tree);
 2800              break;
 2801          case BGP_CAPABILITY:
 2802              dissect_bgp_capability(tvb, bgp1_tree);
 2803              break;
 2804          default:
 2805              break;
 2806          }
 2807      }
 2808  }
Show more  




Change Warning 12549.35734 : Ignored Return Value

Priority:
State:
Finding:
Owner:
Note: