Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375523
b: refs/heads/master
c: 7da1997
h: refs/heads/master
i:
  375521: 65d4d07
  375519: 9eaffd2
v: v3
  • Loading branch information
Marek Lindner authored and Antonio Quartulli committed May 9, 2013
1 parent ba34cd7 commit e94e59a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 293c9c1cef6be46ad72b528fa79c3ff034551fe0
refs/heads/master: 7da19971a9da9c5e63d259c9a8a566f071dc95d0
8 changes: 6 additions & 2 deletions trunk/net/batman-adv/network-coding.c
Original file line number Diff line number Diff line change
Expand Up @@ -1514,6 +1514,7 @@ batadv_nc_skb_decode_packet(struct batadv_priv *bat_priv, struct sk_buff *skb,
struct ethhdr *ethhdr, ethhdr_tmp;
uint8_t *orig_dest, ttl, ttvn;
unsigned int coding_len;
int err;

/* Save headers temporarily */
memcpy(&coded_packet_tmp, skb->data, sizeof(coded_packet_tmp));
Expand Down Expand Up @@ -1568,8 +1569,11 @@ batadv_nc_skb_decode_packet(struct batadv_priv *bat_priv, struct sk_buff *skb,
coding_len);

/* Resize decoded skb if decoded with larger packet */
if (nc_packet->skb->len > coding_len + h_size)
pskb_trim_rcsum(skb, coding_len + h_size);
if (nc_packet->skb->len > coding_len + h_size) {
err = pskb_trim_rcsum(skb, coding_len + h_size);
if (err)
return NULL;
}

/* Create decoded unicast packet */
unicast_packet = (struct batadv_unicast_packet *)skb->data;
Expand Down

0 comments on commit e94e59a

Please sign in to comment.