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 <jpettit@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
static bool
is_gratuitous_arp(const struct flow *flow, struct flow_wildcards *wc)
{
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;
}
if (flow->dl_type != htons(ETH_TYPE_ARP)) {
return false;
}
ctx->xout->has_normal = true;
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,
memset(&ctx->xout->wc.masks.dl_src, 0xff,
sizeof ctx->xout->wc.masks.dl_src);
memset(&ctx->xout->wc.masks.dl_dst, 0xff,