aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink/af_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netlink/af_netlink.c')
-rw-r--r--net/netlink/af_netlink.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index ed587be1e1c2..2760b62dc2c1 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1760,12 +1760,18 @@ int nlmsg_notify(struct sock *sk, struct sk_buff *skb, u32 pid,
1760 exclude_pid = pid; 1760 exclude_pid = pid;
1761 } 1761 }
1762 1762
1763 /* errors reported via destination sk->sk_err */ 1763 /* errors reported via destination sk->sk_err, but propagate
1764 nlmsg_multicast(sk, skb, exclude_pid, group, flags); 1764 * delivery errors if NETLINK_BROADCAST_ERROR flag is set */
1765 err = nlmsg_multicast(sk, skb, exclude_pid, group, flags);
1765 } 1766 }
1766 1767
1767 if (report) 1768 if (report) {
1768 err = nlmsg_unicast(sk, skb, pid); 1769 int err2;
1770
1771 err2 = nlmsg_unicast(sk, skb, pid);
1772 if (!err || err == -ESRCH)
1773 err = err2;
1774 }
1769 1775
1770 return err; 1776 return err;
1771} 1777}