359f916dc7882b648690a2c4747116c1d49fb4d6
[sliver-openvswitch.git] / datapath / linux / compat / genetlink-openvswitch.c
1 #include <net/genetlink.h>
2 #include <linux/version.h>
3
4 /* This is analogous to rtnl_notify() but uses genl_sock instead of rtnl.
5  *
6  * This is not (yet) in any upstream kernel. */
7 void genl_notify(struct sk_buff *skb, struct net *net, u32 portid, u32 group,
8                  struct nlmsghdr *nlh, gfp_t flags)
9 {
10         struct sock *sk = net->genl_sock;
11         int report = 0;
12
13         if (nlh)
14                 report = nlmsg_report(nlh);
15
16         nlmsg_notify(sk, skb, portid, group, report, flags);
17 }