1 --- a/include/linux/kobject.h
2 +++ b/include/linux/kobject.h
4 #define UEVENT_NUM_ENVP 32 /* number of env pointers */
5 #define UEVENT_BUFFER_SIZE 2048 /* buffer for the variables */
9 /* path to the userspace helper executed on an event */
10 extern char uevent_helper[];
12 @@ -218,4 +220,7 @@ int add_uevent_var(struct kobj_uevent_en
13 int kobject_action_type(const char *buf, size_t count,
14 enum kobject_action *type);
16 +int broadcast_uevent(struct sk_buff *skb, __u32 pid, __u32 group,
19 #endif /* _KOBJECT_H_ */
20 --- a/lib/kobject_uevent.c
21 +++ b/lib/kobject_uevent.c
22 @@ -382,6 +382,43 @@ int add_uevent_var(struct kobj_uevent_en
23 EXPORT_SYMBOL_GPL(add_uevent_var);
25 #if defined(CONFIG_NET)
26 +int broadcast_uevent(struct sk_buff *skb, __u32 pid, __u32 group,
29 + struct uevent_sock *ue_sk;
32 + /* send netlink message */
33 + mutex_lock(&uevent_sock_mutex);
34 + list_for_each_entry(ue_sk, &uevent_sock_list, list) {
35 + struct sock *uevent_sock = ue_sk->sk;
36 + struct sk_buff *skb2;
38 + skb2 = skb_clone(skb, allocation);
42 + err = netlink_broadcast(uevent_sock, skb2, pid, group,
47 + mutex_unlock(&uevent_sock_mutex);
53 +int broadcast_uevent(struct sk_buff *skb, __u32 pid, __u32 group,
60 +EXPORT_SYMBOL_GPL(broadcast_uevent);
62 +#if defined(CONFIG_NET)
63 static int uevent_net_init(struct net *net)
65 struct uevent_sock *ue_sk;