mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
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>
This commit is contained in:
commit
10d13421a6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user