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

Commit eb1ef768 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: rmnet_data: Fix incorrect netlink handling"

parents a1b5fc92 8e2e2312
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2015, 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
@@ -531,6 +531,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,