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

Commit fa4f6215 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: Check for endpoint validity when demuxing"

parents d8e32e67 4b5151f1
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -453,6 +453,13 @@ static rx_handler_result_t _rmnet_map_ingress_handler
	}
	}


	ep = &config->muxed_ep[mux_id];
	ep = &config->muxed_ep[mux_id];
	if (!ep->refcount) {
		LOGD("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;
	skb->dev = ep->egress_dev;


+2 −1
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (c) 2014, 2016 The Linux Foundation. All rights reserved.
 * Copyright (c) 2014, 2016, 2018 The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -39,6 +39,7 @@ enum rmnet_skb_free_e {
	RMNET_STATS_SKBFREE_DEAGG_DATA_LEN_0,
	RMNET_STATS_SKBFREE_DEAGG_DATA_LEN_0,
	RMNET_STATS_SKBFREE_INGRESS_BAD_MAP_CKSUM,
	RMNET_STATS_SKBFREE_INGRESS_BAD_MAP_CKSUM,
	RMNET_STATS_SKBFREE_MAPC_UNSUPPORTED,
	RMNET_STATS_SKBFREE_MAPC_UNSUPPORTED,
	RMNET_STATS_SKBFREE_MAPINGRESS_MUX_NO_EP,
	RMNET_STATS_SKBFREE_MAX
	RMNET_STATS_SKBFREE_MAX
};
};