summaryrefslogtreecommitdiffstats
path: root/net/core/drop_monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/drop_monitor.c')
-rw-r--r--net/core/drop_monitor.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
index 0efc5028ba9d..46ee488c0015 100644
--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -106,6 +106,10 @@ static struct sk_buff *reset_per_cpu_data(struct per_cpu_dm_data *data)
return skb;
}
+static struct genl_multicast_group dm_mcgrp = {
+ .name = "events",
+};
+
static void send_dm_alert(struct work_struct *work)
{
struct sk_buff *skb;
@@ -116,7 +120,7 @@ static void send_dm_alert(struct work_struct *work)
skb = reset_per_cpu_data(data);
if (skb)
- genlmsg_multicast(skb, 0, NET_DM_GRP_ALERT, GFP_KERNEL);
+ genlmsg_multicast(skb, 0, dm_mcgrp.id, GFP_KERNEL);
}
/*
@@ -371,6 +375,13 @@ static int __init init_net_drop_monitor(void)
return rc;
}
+ rc = genl_register_mc_group(&net_drop_monitor_family, &dm_mcgrp);
+ if (rc) {
+ pr_err("Failed to register drop monitor mcast group\n");
+ goto out_unreg;
+ }
+ WARN_ON(dm_mcgrp.id != NET_DM_GRP_ALERT);
+
rc = register_netdevice_notifier(&dropmon_net_notifier);
if (rc < 0) {
pr_crit("Failed to register netdevice notifier\n");
OpenPOWER on IntegriCloud