Commit 46a65732 authored by Stephen Hemminger's avatar Stephen Hemminger

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: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent c86f3494
......@@ -48,7 +48,6 @@ static int
parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
struct nlmsghdr *n)
{
struct tc_skbedit sel;
int argc = *argc_p;
char **argv = *argv_p;
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;
__u16 queue_mapping;
__u32 flags = 0, priority;
struct tc_skbedit sel = { 0 };
if (matches(*argv, "skbedit") != 0)
return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment