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

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.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents a1d83abc 3ba0bf47
...@@ -8321,9 +8321,8 @@ static int __dev_set_promiscuity(struct net_device *dev, int inc, bool notify) ...@@ -8321,9 +8321,8 @@ static int __dev_set_promiscuity(struct net_device *dev, int inc, bool notify)
} }
} }
if (dev->flags != old_flags) { if (dev->flags != old_flags) {
pr_info("device %s %s promiscuous mode\n", netdev_info(dev, "%s promiscuous mode\n",
dev->name, dev->flags & IFF_PROMISC ? "entered" : "left");
dev->flags & IFF_PROMISC ? "entered" : "left");
if (audit_enabled) { if (audit_enabled) {
current_uid_gid(&uid, &gid); current_uid_gid(&uid, &gid);
audit_log(audit_context(), GFP_ATOMIC, audit_log(audit_context(), GFP_ATOMIC,
...@@ -8391,6 +8390,8 @@ static int __dev_set_allmulti(struct net_device *dev, int inc, bool notify) ...@@ -8391,6 +8390,8 @@ static int __dev_set_allmulti(struct net_device *dev, int inc, bool notify)
} }
} }
if (dev->flags ^ old_flags) { 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_change_rx_flags(dev, IFF_ALLMULTI);
dev_set_rx_mode(dev); dev_set_rx_mode(dev);
if (notify) if (notify)
......
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