From: Justin Pettit Date: Wed, 12 Jun 2013 00:15:31 +0000 (-0700) Subject: ofproto-dpif: Never wildcard dl_type for "normal" action. X-Git-Tag: sliver-openvswitch-1.10.90-3~6^2~128 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c432bff7928a41651b0a14f499ba8b27f0c0b6e8;p=sliver-openvswitch.git ofproto-dpif: Never wildcard dl_type for "normal" action. The is_gratuitous_arp() function is occasionally called when processing the "normal" action. The previous code only disabled wildcarding the dl_type field when the function was called, but since it runs occasionally, it could lead to inconsistencies in the facet table. This commit causes the dl_type to never be wildcarded when the "normal" action is used. Signed-off-by: Justin Pettit Acked-by: Ethan Jackson --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 46c426afd..74a6ead10 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -7484,7 +7484,6 @@ update_mirror_stats(struct ofproto_dpif *ofproto, mirror_mask_t mirrors, static bool is_gratuitous_arp(const struct flow *flow, struct flow_wildcards *wc) { - memset(&wc->masks.dl_type, 0xff, sizeof wc->masks.dl_type); if (flow->dl_type != htons(ETH_TYPE_ARP)) { return false; } @@ -7660,6 +7659,10 @@ xlate_normal(struct xlate_ctx *ctx) ctx->xout->has_normal = true; + /* Check the dl_type, since we may check for gratuituous ARP. */ + memset(&ctx->xout->wc.masks.dl_type, 0xff, + sizeof ctx->xout->wc.masks.dl_type); + memset(&ctx->xout->wc.masks.dl_src, 0xff, sizeof ctx->xout->wc.masks.dl_src); memset(&ctx->xout->wc.masks.dl_dst, 0xff,