ip: reassembly: avoid corruption in vnet buffer
Avoid corrupt next_index in vnet_buffer by moving input and output
variables into different memory places instead of sharing a common
space.
Type: fix
Fixes:
@@ -185,8 +185,9 @@ typedef struct
/* reassembly */
union
{
- /* group input/handoff as handoff is done before input is consumed,
- * this way we can handoff while keeping input variables intact */
+ /* group input/output/handoff to simplify the code, this way:
+ * we can handoff while keeping input variables intact
+ * and also we can write the output and still use next_index later */
struct
{
/* input variables */
@@ -200,7 +201,6 @@ typedef struct
{
u16 owner_thread_index;
};
- };
/* output variables */
struct
{
@@ -220,6 +220,7 @@ typedef struct
};
};
};
+ };
/* internal variables used during reassembly */
struct
{
