Skip to content

Commit

Permalink
Merge tag 'batadv-net-pullrequest-20220508' of git://git.open-mesh.or…
Browse files Browse the repository at this point in the history
…g/linux-merge

Simon Wunderlich says:

====================
Here is a batman-adv bugfix:

 - Don't skb_split skbuffs with frag_list, by Sven Eckelmann

* tag 'batadv-net-pullrequest-20220508' of git://git.open-mesh.org/linux-merge:
  batman-adv: Don't skb_split skbuffs with frag_list
====================

Link: https://lore.kernel.org/r/20220508132110.20451-1-sw@simonwunderlich.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jakub Kicinski committed May 10, 2022
2 parents 630fd48 + a063f2f commit fc54e39
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions net/batman-adv/fragmentation.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,17 @@ int batadv_frag_send_packet(struct sk_buff *skb,
goto free_skb;
}

/* GRO might have added fragments to the fragment list instead of
* frags[]. But this is not handled by skb_split and must be
* linearized to avoid incorrect length information after all
* batman-adv fragments were created and submitted to the
* hard-interface
*/
if (skb_has_frag_list(skb) && __skb_linearize(skb)) {
ret = -ENOMEM;
goto free_skb;
}

/* Create one header to be copied to all fragments */
frag_header.packet_type = BATADV_UNICAST_FRAG;
frag_header.version = BATADV_COMPAT_VERSION;
Expand Down

0 comments on commit fc54e39

Please sign in to comment.