summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/tvlv.c
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio.quartulli@open-mesh.com>2016-05-18 11:38:48 +0200
committerSimon Wunderlich <sw@simonwunderlich.de>2016-07-04 12:37:18 +0200
commitf50ca95a691e9fd1fce530aade58c98d621cb1fe (patch)
tree8a44b847d9cdc89d92289db192e34977307df55c /net/batman-adv/tvlv.c
parentbatman-adv: add netlink command to query generic mesh information files (diff)
downloadlinux-f50ca95a691e9fd1fce530aade58c98d621cb1fe.tar.xz
linux-f50ca95a691e9fd1fce530aade58c98d621cb1fe.zip
batman-adv: return netdev status in the TX path
Return the proper netdev TX status along the TX path so that the tp_meter can understand when the queue is full and should stop sending packets. Signed-off-by: Antonio Quartulli <antonio.quartulli@open-mesh.com> Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/tvlv.c')
-rw-r--r--net/batman-adv/tvlv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/batman-adv/tvlv.c b/net/batman-adv/tvlv.c
index 2fd542e0d6a8..3d1cf0fb112d 100644
--- a/net/batman-adv/tvlv.c
+++ b/net/batman-adv/tvlv.c
@@ -591,6 +591,7 @@ void batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, u8 *src,
unsigned char *tvlv_buff;
unsigned int tvlv_len;
ssize_t hdr_len = sizeof(*unicast_tvlv_packet);
+ int res;
orig_node = batadv_orig_hash_find(bat_priv, dst);
if (!orig_node)
@@ -623,7 +624,8 @@ void batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, u8 *src,
tvlv_buff += sizeof(*tvlv_hdr);
memcpy(tvlv_buff, tvlv_value, tvlv_value_len);
- if (batadv_send_skb_to_orig(skb, orig_node, NULL) == NET_XMIT_DROP)
+ res = batadv_send_skb_to_orig(skb, orig_node, NULL);
+ if (res == -1)
kfree_skb(skb);
out:
batadv_orig_node_put(orig_node);