geneve: Zero header before parsing userspace tunneling action.
authorJesse Gross <jesse@nicira.com>
Wed, 8 Apr 2015 01:55:54 +0000 (18:55 -0700)
committerJesse Gross <jesse@nicira.com>
Wed, 8 Apr 2015 02:00:17 +0000 (19:00 -0700)
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 <jesse@nicira.com>
lib/odp-util.c

index 7725a09..8a81f6b 100644 (file)
@@ -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;
             }