driver: macvlan: Check if need rollback multicast setting in macvlan_open
authorGao Feng <fgao@ikuai8.com>
Tue, 22 Nov 2016 01:54:36 +0000 (09:54 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Nov 2016 01:18:36 +0000 (20:18 -0500)
commitc3891fa2543cbab26093f5e425b8a50cd6837f16
tree17764f348b48b64d692b8ada70d274ed85c72b8c
parentffa54a238c69184414a8f3dc35a18aed875290e7
driver: macvlan: Check if need rollback multicast setting in macvlan_open

When dev_set_promiscuity failed in macvlan_open, it always invokes
dev_set_allmulti without checking if necessary.
Now check the IFF_ALLMULTI flag firstly before rollback the multicast
setting in the error handler.

Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c