diff options
author | Sven Eckelmann <sven@narfation.org> | 2016-07-17 21:04:03 +0200 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2016-10-30 11:11:37 +0100 |
commit | 1ad5bcb2a032262170fdc508abfa0acb0565e2b5 (patch) | |
tree | 4c5e313c22aa50eddf909ebf7974ec3c32670dc8 /net/batman-adv/tp_meter.c | |
parent | 8def0be82dd1507bcdc5fd35d12e35ace1e39dff (diff) | |
download | op-kernel-dev-1ad5bcb2a032262170fdc508abfa0acb0565e2b5.zip op-kernel-dev-1ad5bcb2a032262170fdc508abfa0acb0565e2b5.tar.gz |
batman-adv: Consume skb in batadv_send_skb_to_orig
Sending functions in Linux consume the supplied skbuff. Doing the same in
batadv_send_skb_to_orig avoids the hack of returning -1 (-EPERM) to signal
the caller that he is responsible for cleaning up the skb.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/tp_meter.c')
-rw-r--r-- | net/batman-adv/tp_meter.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c index 2333777..f156452 100644 --- a/net/batman-adv/tp_meter.c +++ b/net/batman-adv/tp_meter.c @@ -615,9 +615,6 @@ static int batadv_tp_send_msg(struct batadv_tp_vars *tp_vars, const u8 *src, batadv_tp_fill_prerandom(tp_vars, data, data_len); r = batadv_send_skb_to_orig(skb, orig_node, NULL); - if (r == -1) - kfree_skb(skb); - if (r == NET_XMIT_SUCCESS) return 0; @@ -1206,9 +1203,6 @@ static int batadv_tp_send_ack(struct batadv_priv *bat_priv, const u8 *dst, /* send the ack */ r = batadv_send_skb_to_orig(skb, orig_node, NULL); - if (r == -1) - kfree_skb(skb); - if (unlikely(r < 0) || (r == NET_XMIT_DROP)) { ret = BATADV_TP_REASON_DST_UNREACHABLE; goto out; |