> From: "Ben Pfaff" <b...@ovn.org>
> To: d...@openvswitch.org
> Cc: "Ben Pfaff" <b...@ovn.org>
> Sent: Monday, 12 June, 2017 12:54:42 PM
> Subject: [ovs-dev] [PATCH] ofp-util: Initialize tunnel metadata for OpenFlow  
> 1.0 matches.
> 
> Found by valgrind.
> 
> Signed-off-by: Ben Pfaff <b...@ovn.org>
> ---
>  lib/ofp-util.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/ofp-util.c b/lib/ofp-util.c
> index 601a719797e5..da171cdf6fe5 100644
> --- a/lib/ofp-util.c
> +++ b/lib/ofp-util.c
> @@ -159,6 +159,7 @@ ofputil_match_from_ofp10_match(const struct ofp10_match
> *ofmatch,
>      /* Initialize match->wc. */
>      memset(&match->flow, 0, sizeof match->flow);
>      ofputil_wildcard_from_ofpfw10(ofpfw, &match->wc);
> +    memset(&match->tun_md, 0, sizeof match->tun_md);
>  
>      /* Initialize most of match->flow. */
>      match->flow.nw_src = ofmatch->nw_src;
> --
> 2.10.2
> 

Strangely enough, I was just looking at error reports from gcc + ubsan
and clang + memory sanitizer for this very problem. (The memory sanitizer
is *much* faster than valgrind, btw...).

Tested-by: Lance Richardson <lrich...@redhat.com>
Acked-by: Lance Richardson <lrich...@redhat.com>
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to