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

Commit 53a726ed authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: rmnet_data: Fix incorrect netlink handling" into msm-4.8

parents fe03cf33 2357fa54
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2017, 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
@@ -557,6 +557,11 @@ void rmnet_config_netlink_msg_handler(struct sk_buff *skb)
	nlmsg_header = (struct nlmsghdr *)skb->data;
	rmnet_header = (struct rmnet_nl_msg_s *)nlmsg_data(nlmsg_header);

	if (!nlmsg_header->nlmsg_pid ||
	    (nlmsg_header->nlmsg_len < sizeof(struct nlmsghdr) +
				       sizeof(struct rmnet_nl_msg_s)))
		return;

	LOGL("Netlink message pid=%d, seq=%d, length=%d, rmnet_type=%d",
	     nlmsg_header->nlmsg_pid,
	     nlmsg_header->nlmsg_seq,