Commit 0b7d91a9 authored by James Morris's avatar James Morris Committed by David S. Miller

[NETLINK]: Just drop packets for kernel netlink socket with no data_ready handler.

parent a7f8fc95
......@@ -430,6 +430,10 @@ int netlink_unicast(struct sock *ssk, struct sk_buff *skb, u32 pid, int nonblock
goto no_dst;
nlk = nlk_sk(sk);
/* Don't bother queuing skb if kernel socket has no input function */
if (nlk->pid == 0 && !nlk->data_ready)
goto no_dst;
#ifdef NL_EMULATE_DEV
if (nlk->handler) {
skb_orphan(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment