X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Flinux%2Fcompat%2Fgenetlink.inc;h=ad2630ff6d7151f9173b394a5e8abac1ce40d27d;hb=a8643e447601201aabd1159966bd716e48378f97;hp=bf969802763f0e2ddafa1b9977f062431ac2684a;hpb=077257b83c68a36ea86f2d21c8395f60df710c21;p=sliver-openvswitch.git diff --git a/datapath/linux/compat/genetlink.inc b/datapath/linux/compat/genetlink.inc index bf9698027..ad2630ff6 100644 --- a/datapath/linux/compat/genetlink.inc +++ b/datapath/linux/compat/genetlink.inc @@ -86,33 +86,33 @@ err_out: * nlmsg_notify - send a notification netlink message * @sk: netlink socket to use * @skb: notification message - * @pid: destination netlink pid for reports or 0 + * @portid: destination netlink portid for reports or 0 * @group: destination multicast group or 0 * @report: 1 to report back, 0 to disable * @flags: allocation flags */ -int nlmsg_notify(struct sock *sk, struct sk_buff *skb, u32 pid, +int nlmsg_notify(struct sock *sk, struct sk_buff *skb, u32 portid, unsigned int group, int report, gfp_t flags) { int err = 0; if (group) { - int exclude_pid = 0; + int exclude_portid = 0; if (report) { atomic_inc(&skb->users); - exclude_pid = pid; + exclude_portid = portid; } /* errors reported via destination sk->sk_err, but propagate * delivery errors if NETLINK_BROADCAST_ERROR flag is set */ - err = nlmsg_multicast(sk, skb, exclude_pid, group, flags); + err = nlmsg_multicast(sk, skb, exclude_portid, group, flags); } if (report) { int err2; - err2 = nlmsg_unicast(sk, skb, pid); + err2 = nlmsg_unicast(sk, skb, portid); if (!err || err == -ESRCH) err = err2; } @@ -124,7 +124,7 @@ int nlmsg_notify(struct sock *sk, struct sk_buff *skb, u32 pid, /* This is analogous to rtnl_notify() but uses genl_sock instead of rtnl. * * This is not (yet) in any upstream kernel. */ -void genl_notify(struct sk_buff *skb, struct net *net, u32 pid, u32 group, +void genl_notify(struct sk_buff *skb, struct net *net, u32 portid, u32 group, struct nlmsghdr *nlh, gfp_t flags) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32) @@ -137,12 +137,12 @@ void genl_notify(struct sk_buff *skb, struct net *net, u32 pid, u32 group, if (nlh) report = nlmsg_report(nlh); - nlmsg_notify(sk, skb, pid, group, report, flags); + nlmsg_notify(sk, skb, portid, group, report, flags); } #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) /* This function wasn't exported before 2.6.30. Lose! */ -void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code) +void netlink_set_err(struct sock *ssk, u32 portid, u32 group, int code) { } #endif