mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ipvlan: Don't propagate IFF_ALLMULTI changes on down interfaces.
@ 2019-06-03  3:23 Young Xiao
  2019-06-03  7:53 ` Xin Long
  0 siblings, 1 reply; 3+ messages in thread
From: Young Xiao @ 2019-06-03  3:23 UTC (permalink / raw)
  To: davem, daniel, petrm, jiri, idosch, lucien.xin, uehaibing,
	liuhangbin, netdev, linux-kernel
  Cc: Young Xiao

Clearing the IFF_ALLMULTI flag on a down interface could cause an allmulti
overflow on the underlying interface.

Attempting the set IFF_ALLMULTI on the underlying interface would cause an
error and the log message:

"allmulti touches root, set allmulti failed."

Signed-off-by: Young Xiao <92siuyang@gmail.com>
---
 drivers/net/ipvlan/ipvlan_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index bbeb162..523bb83 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -242,8 +242,10 @@ static void ipvlan_change_rx_flags(struct net_device *dev, int change)
 	struct ipvl_dev *ipvlan = netdev_priv(dev);
 	struct net_device *phy_dev = ipvlan->phy_dev;
 
-	if (change & IFF_ALLMULTI)
-		dev_set_allmulti(phy_dev, dev->flags & IFF_ALLMULTI? 1 : -1);
+	if (dev->flags & IFF_UP) {
+		if (change & IFF_ALLMULTI)
+			dev_set_allmulti(phy_dev, dev->flags & IFF_ALLMULTI ? 1 : -1);
+	}
 }
 
 static void ipvlan_set_multicast_mac_filter(struct net_device *dev)
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-03  8:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03  3:23 [PATCH] ipvlan: Don't propagate IFF_ALLMULTI changes on down interfaces Young Xiao
2019-06-03  7:53 ` Xin Long
2019-06-03  8:27   ` Yang Xiao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®