Commit 1996cf46 authored by Denis Efremov's avatar Denis Efremov Committed by David S. Miller

net: bcmgenet: fix mask check in bcmgenet_validate_flow()

VALIDATE_MASK(eth_mask->h_source) is checked twice in a row in
bcmgenet_validate_flow(). Add VALIDATE_MASK(eth_mask->h_dest)
instead.

Fixes: 3e370952 ("net: bcmgenet: add support for ethtool rxnfc flows")
Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
Acked-by: default avatarDoug Berger <opendmb@gmail.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7deedd9f
...@@ -1364,7 +1364,7 @@ static int bcmgenet_validate_flow(struct net_device *dev, ...@@ -1364,7 +1364,7 @@ static int bcmgenet_validate_flow(struct net_device *dev,
case ETHER_FLOW: case ETHER_FLOW:
eth_mask = &cmd->fs.m_u.ether_spec; eth_mask = &cmd->fs.m_u.ether_spec;
/* don't allow mask which isn't valid */ /* don't allow mask which isn't valid */
if (VALIDATE_MASK(eth_mask->h_source) || if (VALIDATE_MASK(eth_mask->h_dest) ||
VALIDATE_MASK(eth_mask->h_source) || VALIDATE_MASK(eth_mask->h_source) ||
VALIDATE_MASK(eth_mask->h_proto)) { VALIDATE_MASK(eth_mask->h_proto)) {
netdev_err(dev, "rxnfc: Unsupported mask\n"); netdev_err(dev, "rxnfc: Unsupported mask\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment