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

Commit fbb39fc2 authored by Kaustubh Pandey's avatar Kaustubh Pandey Committed by Gerrit - the friendly Code Review server
Browse files

net: rmnet_data: ignore pkts coming with wrong epconfig



pkts received with incorrect QMAP header maps to wrong epconfig
eventually causing stack to handle the packet.
This change handles those packets gracefully as they came with QMAP hdr
and were intended for rmnet_data driver.

Change-Id: Iccc2c1fbfdc3bed960f703d99cf9f15fa82a428f
Signed-off-by: default avatarKaustubh Pandey <kapandey@codeaurora.org>
parent 92fc776b
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2018, 2020 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
@@ -448,6 +448,14 @@ static rx_handler_result_t _rmnet_map_ingress_handler

	ep = &config->muxed_ep[mux_id];

	if (!ep->refcount) {
		LOGE("Packet on %s:%d; has no logical endpoint config",
		     skb->dev->name, mux_id);

		rmnet_kfree_skb(skb, RMNET_STATS_SKBFREE_MAPINGRESS_MUX_NO_EP);
		return RX_HANDLER_CONSUMED;
	}

	skb->dev = ep->egress_dev;

	if ((config->ingress_data_format & RMNET_INGRESS_FORMAT_MAP_CKSUMV3) ||
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ enum rmnet_skb_free_e {
	RMNET_STATS_SKBFREE_DELIVER_NO_EP,
	RMNET_STATS_SKBFREE_IPINGRESS_NO_EP,
	RMNET_STATS_SKBFREE_MAPINGRESS_BAD_MUX,
	RMNET_STATS_SKBFREE_MAPINGRESS_MUX_NO_EP,
	RMNET_STATS_SKBFREE_MAPINGRESS_AGGBUF,
	RMNET_STATS_SKBFREE_INGRESS_NOT_EXPECT_MAPD,
	RMNET_STATS_SKBFREE_INGRESS_NOT_EXPECT_MAPC,