diff options
Diffstat (limited to 'net/batman-adv/routing.c')
| -rw-r--r-- | net/batman-adv/routing.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 1ed9f7c9ecea..a953d5b196a3 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c | |||
| @@ -688,7 +688,7 @@ static int batadv_check_unicast_ttvn(struct batadv_priv *bat_priv, | |||
| 688 | int is_old_ttvn; | 688 | int is_old_ttvn; |
| 689 | 689 | ||
| 690 | /* check if there is enough data before accessing it */ | 690 | /* check if there is enough data before accessing it */ |
| 691 | if (pskb_may_pull(skb, hdr_len + ETH_HLEN) < 0) | 691 | if (!pskb_may_pull(skb, hdr_len + ETH_HLEN)) |
| 692 | return 0; | 692 | return 0; |
| 693 | 693 | ||
| 694 | /* create a copy of the skb (in case of for re-routing) to modify it. */ | 694 | /* create a copy of the skb (in case of for re-routing) to modify it. */ |
| @@ -918,6 +918,8 @@ int batadv_recv_unicast_tvlv(struct sk_buff *skb, | |||
| 918 | 918 | ||
| 919 | if (ret != NET_RX_SUCCESS) | 919 | if (ret != NET_RX_SUCCESS) |
| 920 | ret = batadv_route_unicast_packet(skb, recv_if); | 920 | ret = batadv_route_unicast_packet(skb, recv_if); |
| 921 | else | ||
| 922 | consume_skb(skb); | ||
| 921 | 923 | ||
| 922 | return ret; | 924 | return ret; |
| 923 | } | 925 | } |
