From 46e7137c77d845c488e17b718eac7c3fb97cedcc Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Tue, 7 Apr 2015 18:55:54 -0700 Subject: [PATCH] geneve: Zero header before parsing userspace tunneling action. When we parse the text representation of the Geneve action the header is not fully initialized. Besides the obvious potential to generate an action that the user did not actually specify, this also causes intermittent unit test failures when an action is read in and printed out and the result is different. Signed-off-by: Jesse Gross --- lib/odp-util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/odp-util.c b/lib/odp-util.c index 7725a09f0..8a81f6b47 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -921,6 +921,7 @@ ovs_parse_tnl_push(const char *s, struct ovs_action_push_tnl *data) } else if (ovs_scan_len(s, &n, "geneve(")) { struct genevehdr *gnh = (struct genevehdr *) (udp + 1); + memset(gnh, 0, sizeof *gnh); if (ovs_scan_len(s, &n, "oam,")) { gnh->oam = 1; } -- 2.39.5