diff options
| author | songyanchao <[email protected]> | 2024-07-31 09:11:26 +0000 |
|---|---|---|
| committer | songyanchao <[email protected]> | 2024-08-09 09:31:50 +0000 |
| commit | 0975a9d01780acb8aaf89db0704c46b21d9be3c0 (patch) | |
| tree | 3d888e6f0b84ebabc350ad257f8d95a92809b0d4 | |
| parent | 7aed37ad50e7e1da4d56ccd5642b0bb823f764e1 (diff) | |
🐞 fix(DPISDN-52): Fix uninitialized variable error.
Fix uninitialized variable error.
| -rw-r--r-- | service/src/node_bfd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/service/src/node_bfd.c b/service/src/node_bfd.c index aa0fa9c..96f3f6c 100644 --- a/service/src/node_bfd.c +++ b/service/src/node_bfd.c @@ -722,6 +722,8 @@ static uint16_t bfd_node_process(struct rte_graph * graph, struct rte_node * nod /* Single packet processing */ while (n_left_from > 0) { + uint8_t bfd_state = BFD_STATE_ADMINDOWN; + struct bfd_session * bfd_session = NULL; struct rte_mbuf * mbuf = pkts[0]; pkts += 1; n_left_from -= 1; @@ -756,7 +758,7 @@ static uint16_t bfd_node_process(struct rte_graph * graph, struct rte_node * nod assert(bfd_hdr != NULL); /* Bfd session search */ - struct bfd_session * bfd_session = bfd_session_lookup(bfd_session_handle, ipv4_hdr->src_addr); + bfd_session = bfd_session_lookup(bfd_session_handle, ipv4_hdr->src_addr); if (unlikely(bfd_session == NULL)) { @@ -770,7 +772,7 @@ static uint16_t bfd_node_process(struct rte_graph * graph, struct rte_node * nod } /* Reply bfd request */ - uint8_t bfd_state = bfd_pkt_reply(ether_hdr, ipv4_hdr, udp_hdr, bfd_hdr, bfd_session); + bfd_state = bfd_pkt_reply(ether_hdr, ipv4_hdr, udp_hdr, bfd_hdr, bfd_session); /* Update bfd session prev_tsc */ __bfd_session_update(bfd_session); |
