Commit 8b8701d0 authored by Kristian Evensen's avatar Kristian Evensen Committed by David S. Miller

net: ethernet: rmnet: Always subtract MAP header

Commit e1d9a90a ("net: ethernet: rmnet: Support for ingress MAPv5
checksum offload") broke ingress handling for devices where
RMNET_FLAGS_INGRESS_MAP_CKSUMV5 or RMNET_FLAGS_INGRESS_MAP_CKSUMV4 are
not set. Unless either of these flags are set, the MAP header is not
removed. This commit restores the original logic by ensuring that the
MAP header is removed for all MAP packets.

Fixes: e1d9a90a ("net: ethernet: rmnet: Support for ingress MAPv5 checksum offload")
Signed-off-by: default avatarKristian Evensen <kristian.evensen@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6fb566c9
......@@ -88,11 +88,12 @@ __rmnet_map_ingress_handler(struct sk_buff *skb,
goto free_skb;
skb_pull(skb, sizeof(*map_header));
rmnet_set_skb_proto(skb);
} else if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4) {
} else {
/* Subtract MAP header */
skb_pull(skb, sizeof(*map_header));
rmnet_set_skb_proto(skb);
if (!rmnet_map_checksum_downlink_packet(skb, len + pad))
if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4 &&
!rmnet_map_checksum_downlink_packet(skb, len + pad))
skb->ip_summed = CHECKSUM_UNNECESSARY;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment