Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43e0e31e authored by Harout Hedeshian's avatar Harout Hedeshian Committed by Matt Wagantall
Browse files

net: sockev: filtering non INET socket events



Too many socket events are generated by netlink socket. Filtering out
unwanted socket events.

Change-Id: I3a4d7e14843cf72d6af2d948113b27928ed01adb
Acked-by: default avatarKrishnan Ramachandran <kramacha@qti.qualcomm.com>
Signed-off-by: default avatarHarout Hedeshian <harouth@codeaurora.org>
parent f38d5a3d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -75,6 +75,9 @@ static int sockev_client_cb(struct notifier_block *nb,
	if ((socknlmsgsk == NULL) || (sock == NULL) || (sock->sk == NULL))
		goto done;

	if (sock->sk->sk_family != AF_INET || sock->sk->sk_family != AF_INET6)
		goto done;

	skb = nlmsg_new(sizeof(struct sknlsockevmsg), GFP_KERNEL);
	if (skb == NULL)
		goto done;