diff options
author | Paolo Abeni <pabeni@redhat.com> | 2023-02-16 10:11:29 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-02-16 10:11:29 +0100 |
commit | 10d13421a6ae414ab91d4f2103fc90d1f4216736 (patch) | |
tree | e593d1ef314f8a6aba545f46622f8835af5c51cc | |
parent | a1d83abc8f2f9d2193017665e6804c8baf65d469 (diff) | |
parent | 3ba0bf47edf955d6f52fdb16b54acd1932cb9445 (diff) | |
download | linux-10d13421a6ae414ab91d4f2103fc90d1f4216736.tar.gz linux-10d13421a6ae414ab91d4f2103fc90d1f4216736.tar.bz2 linux-10d13421a6ae414ab91d4f2103fc90d1f4216736.zip |
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: Paolo Abeni <pabeni@redhat.com>
-rw-r--r-- | net/core/dev.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 7307a0c15c9f..357081b0113c 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -8321,9 +8321,8 @@ 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, - dev->flags & IFF_PROMISC ? "entered" : "left"); + netdev_info(dev, "%s promiscuous mode\n", + dev->flags & IFF_PROMISC ? "entered" : "left"); if (audit_enabled) { current_uid_gid(&uid, &gid); audit_log(audit_context(), GFP_ATOMIC, @@ -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) |