diff options
| author | Justin Pettit <jpettit@nicira.com> | 2011-02-22 19:07:05 -0800 |
|---|---|---|
| committer | Justin Pettit <jpettit@nicira.com> | 2011-02-23 11:08:20 -0800 |
| commit | 811da49f926464b9cc3aab7e6ed5e1dfd223d4b2 (patch) | |
| tree | d30db3de7436571de2331d58c28fcf6e3c875aa4 /lib/nx-match.c | |
| parent | 400eb935f2d781494b13569863ce9637d18ddb1a (diff) | |
| download | openvswitch-811da49f926464b9cc3aab7e6ed5e1dfd223d4b2.tar.gz | |
nx-match: Don't fall through case when handling dest mcast mac addresses.
When an NXM wildcard entry that includes a multicast address is parsed,
it would fall through to the next case statement, which would also set
an inappropriate source mac address match.
Coverity #10717
Diffstat (limited to 'lib/nx-match.c')
| -rw-r--r-- | lib/nx-match.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/nx-match.c b/lib/nx-match.c index abc3b210a..4d2e590e5 100644 --- a/lib/nx-match.c +++ b/lib/nx-match.c @@ -198,10 +198,12 @@ parse_nxm_entry(struct cls_rule *rule, const struct nxm_field *f, } else if (eth_addr_equals(mask, eth_mcast_1)) { wc->wildcards &= ~FWW_ETH_MCAST; flow->dl_dst[0] = *(uint8_t *) value & 0x01; + return 0; } else if (eth_addr_equals(mask, eth_mcast_0)) { wc->wildcards &= ~FWW_DL_DST; memcpy(flow->dl_dst, value, ETH_ADDR_LEN); flow->dl_dst[0] &= 0xfe; + return 0; } else if (eth_addr_equals(mask, eth_all_0s)) { return 0; } else if (eth_addr_equals(mask, eth_all_1s)) { |
