fix uninitialized memory in tc_skbedit
Original from: Alexander Duyck <alexander.h.duyck@intel.com> A bug was found in which the memory for the tc_skbedit struct was being used uninitialized to 0. Alternative version of original fix using initializer rather than memset. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
c86f34942a
commit
46a6573259
|
|
@ -48,7 +48,6 @@ static int
|
||||||
parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
|
parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
|
||||||
struct nlmsghdr *n)
|
struct nlmsghdr *n)
|
||||||
{
|
{
|
||||||
struct tc_skbedit sel;
|
|
||||||
int argc = *argc_p;
|
int argc = *argc_p;
|
||||||
char **argv = *argv_p;
|
char **argv = *argv_p;
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
|
|
@ -56,6 +55,7 @@ parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
|
||||||
unsigned int tmp;
|
unsigned int tmp;
|
||||||
__u16 queue_mapping;
|
__u16 queue_mapping;
|
||||||
__u32 flags = 0, priority;
|
__u32 flags = 0, priority;
|
||||||
|
struct tc_skbedit sel = { 0 };
|
||||||
|
|
||||||
if (matches(*argv, "skbedit") != 0)
|
if (matches(*argv, "skbedit") != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue