aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/fragmentation.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/fragmentation.c')
-rw-r--r--net/batman-adv/fragmentation.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
index fc1835c6bb40..00f9e144cc97 100644
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
@@ -251,7 +251,7 @@ batadv_frag_merge_packets(struct hlist_head *chain, struct sk_buff *skb)
251 kfree(entry); 251 kfree(entry);
252 252
253 /* Make room for the rest of the fragments. */ 253 /* Make room for the rest of the fragments. */
254 if (pskb_expand_head(skb_out, 0, size - skb->len, GFP_ATOMIC) < 0) { 254 if (pskb_expand_head(skb_out, 0, size - skb_out->len, GFP_ATOMIC) < 0) {
255 kfree_skb(skb_out); 255 kfree_skb(skb_out);
256 skb_out = NULL; 256 skb_out = NULL;
257 goto free; 257 goto free;
@@ -434,7 +434,7 @@ bool batadv_frag_send_packet(struct sk_buff *skb,
434 * fragments larger than BATADV_FRAG_MAX_FRAG_SIZE 434 * fragments larger than BATADV_FRAG_MAX_FRAG_SIZE
435 */ 435 */
436 mtu = min_t(unsigned, mtu, BATADV_FRAG_MAX_FRAG_SIZE); 436 mtu = min_t(unsigned, mtu, BATADV_FRAG_MAX_FRAG_SIZE);
437 max_fragment_size = (mtu - header_size - ETH_HLEN); 437 max_fragment_size = mtu - header_size;
438 max_packet_size = max_fragment_size * BATADV_FRAG_MAX_FRAGMENTS; 438 max_packet_size = max_fragment_size * BATADV_FRAG_MAX_FRAGMENTS;
439 439
440 /* Don't even try to fragment, if we need more than 16 fragments */ 440 /* Don't even try to fragment, if we need more than 16 fragments */