Skip to content

Commit

Permalink
driver: macvlan: Remove duplicated IFF_UP condition check in macvlan_…
Browse files Browse the repository at this point in the history
…forward_source

The function macvlan_forward_source_one has already checked the flag
IFF_UP, so needn't check it outside in macvlan_forward_source too.

Signed-off-by: Gao Feng <gfree.wind@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Gao Feng authored and David S. Miller committed Nov 21, 2016
1 parent dad42c3 commit fc51f2b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/macvlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,7 @@ static void macvlan_forward_source(struct sk_buff *skb,

hlist_for_each_entry_rcu(entry, h, hlist) {
if (ether_addr_equal_64bits(entry->addr, addr))
if (entry->vlan->dev->flags & IFF_UP)
macvlan_forward_source_one(skb, entry->vlan);
macvlan_forward_source_one(skb, entry->vlan);
}
}

Expand Down

0 comments on commit fc51f2b

Please sign in to comment.