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: Kaustubh Pandey <kapandey@codeaurora.org>
This commit is contained in:
Kaustubh Pandey 2020-01-08 18:00:53 +05:30 committed by Gerrit - the friendly Code Review server
parent 92fc776b9a
commit fbb39fc2c8
2 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* 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) ||

View File

@ -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,