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 | batman-adv: Consume skb in batadv_frag_send_packet (diff) | |
download | linux-1ad5bcb2a032262170fdc508abfa0acb0565e2b5.tar.xz linux-1ad5bcb2a032262170fdc508abfa0acb0565e2b5.zip |
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 2333777f919d..f1564520dfae 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; |