net: rmnet_data: Fix deaggregation to work with DL checksum offload

Specifications state that the MAP packet length in the MAP header do
not account for the number of bytes of packet trailer from DL checksum
offload. Current implementation does not take this into account when
MAP aggregation is enabled.

Fix this by accounting for the extra bytes of the DL checksum trailer
if DL checksum offload is enabled when computing packet length during
MAP deaggregation

Change-Id: I9c10bb9726413b1f14f94210dbe194c2c15349f5
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
This commit is contained in:
Subash Abhinov Kasiviswanathan 2015-03-23 14:21:14 -06:00 committed by David Keitel
parent 84df5f8274
commit 96508c5e05

View file

@ -133,6 +133,9 @@ struct sk_buff *rmnet_map_deaggregate(struct sk_buff *skb,
maph = (struct rmnet_map_header_s *) skb->data;
packet_len = ntohs(maph->pkt_len) + sizeof(struct rmnet_map_header_s);
if (config->ingress_data_format & RMNET_INGRESS_FORMAT_MAP_CKSUMV3)
packet_len += sizeof(struct rmnet_map_dl_checksum_trailer_s);
if ((((int)skb->len) - ((int)packet_len)) < 0) {
LOGM("%s", "Got malformed packet. Dropping");
return 0;