summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2015-04-07 18:55:54 -0700
committerJesse Gross <jesse@nicira.com>2015-04-07 19:00:17 -0700
commit46e7137c77d845c488e17b718eac7c3fb97cedcc (patch)
tree30745a4a4c57bfbada9ed57d84d1e5fc530cc835 /lib
parent8fc55661c57b26ab84a2baa5ef235f1a79c20633 (diff)
downloadopenvswitch-46e7137c77d845c488e17b718eac7c3fb97cedcc.tar.gz
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 <jesse@nicira.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/odp-util.c1
1 files changed, 1 insertions, 0 deletions
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;
}