summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2022-08-31 14:20:40 +0000
committerBeno�t Ganne <bganne@cisco.com>2022-08-31 15:29:35 +0000
commite4046528d412ff64bc1e0cfe3496a56119923718 (patch)
tree36108dafcf653b24c8c7def45a9ac0157e51effc /src
parent62fc78761c2a1e023f9483a54776cc66332ecacc (diff)
pppoe: fix coverity 218437, 218401
Initialize the session index in case of error to ~0, so is defined in case trace needs to copy it. Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: Iddf6df42c09d2abc11e5821944eb4f41692e6e3e
Diffstat (limited to 'src')
-rw-r--r--src/plugins/pppoe/pppoe_decap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/pppoe/pppoe_decap.c b/src/plugins/pppoe/pppoe_decap.c
index fe83c3a2c54..a1c37f6794f 100644
--- a/src/plugins/pppoe/pppoe_decap.c
+++ b/src/plugins/pppoe/pppoe_decap.c
@@ -154,6 +154,7 @@ VLIB_NODE_FN (pppoe_input_node) (vlib_main_t * vm,
vlib_buffer_advance(b0, sizeof(*h0)+sizeof(*vlan0));
error0 = PPPOE_ERROR_CONTROL_PLANE;
next0 = PPPOE_INPUT_NEXT_CP_INPUT;
+ result0.fields.session_index = ~0;
goto trace0;
}
@@ -251,6 +252,7 @@ VLIB_NODE_FN (pppoe_input_node) (vlib_main_t * vm,
vlib_buffer_advance(b1, sizeof(*h1)+sizeof(*vlan1));
error1 = PPPOE_ERROR_CONTROL_PLANE;
next1 = PPPOE_INPUT_NEXT_CP_INPUT;
+ result1.fields.session_index = ~0;
goto trace1;
}
@@ -378,6 +380,7 @@ VLIB_NODE_FN (pppoe_input_node) (vlib_main_t * vm,
vlib_buffer_advance(b0, sizeof(*h0)+sizeof(*vlan0));
error0 = PPPOE_ERROR_CONTROL_PLANE;
next0 = PPPOE_INPUT_NEXT_CP_INPUT;
+ result0.fields.session_index = ~0;
goto trace00;
}