Commit 10d13421 authored by Paolo Abeni's avatar Paolo Abeni
Browse files

Merge branch 'net-core-commmon-prints-for-promisc'

Jesse Brandeburg says:

====================
net/core: commmon prints for promisc

Add a print to the kernel log for allmulticast entry and exit, and
standardize the print for entry and exit of promiscuous mode.

These prints are useful to both user and developer and should have the
triggering driver/bus/device info that netdev_info (optionally) gives.
====================

Link: https://lore.kernel.org/r/20230214210117.23123-1-jesse.brandeburg@intel.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents a1d83abc 3ba0bf47
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -8321,8 +8321,7 @@ static int __dev_set_promiscuity(struct net_device *dev, int inc, bool notify)
		}
	}
	if (dev->flags != old_flags) {
		pr_info("device %s %s promiscuous mode\n",
			dev->name,
		netdev_info(dev, "%s promiscuous mode\n",
			    dev->flags & IFF_PROMISC ? "entered" : "left");
		if (audit_enabled) {
			current_uid_gid(&uid, &gid);
@@ -8391,6 +8390,8 @@ static int __dev_set_allmulti(struct net_device *dev, int inc, bool notify)
		}
	}
	if (dev->flags ^ old_flags) {
		netdev_info(dev, "%s allmulticast mode\n",
			    dev->flags & IFF_ALLMULTI ? "entered" : "left");
		dev_change_rx_flags(dev, IFF_ALLMULTI);
		dev_set_rx_mode(dev);
		if (notify)