diff options
author | Martin Hundebøll <martin@hundeboll.net> | 2013-04-20 07:54:39 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-05-28 20:44:55 -0400 |
commit | e91ecfc64ad691176be119e627e36cec8564f44b (patch) | |
tree | d709428d92da6a522edca57fbec960d7c582c93f /net/batman-adv/vis.c | |
parent | 5f80df6705fcd8153f93bd0e82109dbeb7ff535b (diff) |
batman-adv: Move call to batadv_nc_skb_forward() from routing.c to send.c
The call to batadv_nc_skb_forward() fits better in
batadv_send_skb_to_orig(), as this is where the actual next hop is
looked up.
To let the caller of batadv_send_skb_to_orig() know wether the skb is
transmitted, buffered or failed, the return value is changed from
boolean to int.
Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/vis.c')
-rw-r--r-- | net/batman-adv/vis.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index 94eaeb521c17..4983340f1943 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c | |||
@@ -697,7 +697,7 @@ static void batadv_broadcast_vis_packet(struct batadv_priv *bat_priv, | |||
697 | struct batadv_orig_node *orig_node; | 697 | struct batadv_orig_node *orig_node; |
698 | struct batadv_vis_packet *packet; | 698 | struct batadv_vis_packet *packet; |
699 | struct sk_buff *skb; | 699 | struct sk_buff *skb; |
700 | uint32_t i; | 700 | uint32_t i, res; |
701 | 701 | ||
702 | 702 | ||
703 | packet = (struct batadv_vis_packet *)info->skb_packet->data; | 703 | packet = (struct batadv_vis_packet *)info->skb_packet->data; |
@@ -724,7 +724,8 @@ static void batadv_broadcast_vis_packet(struct batadv_priv *bat_priv, | |||
724 | if (!skb) | 724 | if (!skb) |
725 | continue; | 725 | continue; |
726 | 726 | ||
727 | if (!batadv_send_skb_to_orig(skb, orig_node, NULL)) | 727 | res = batadv_send_skb_to_orig(skb, orig_node, NULL); |
728 | if (res == NET_XMIT_DROP) | ||
728 | kfree_skb(skb); | 729 | kfree_skb(skb); |
729 | } | 730 | } |
730 | rcu_read_unlock(); | 731 | rcu_read_unlock(); |
@@ -748,7 +749,7 @@ static void batadv_unicast_vis_packet(struct batadv_priv *bat_priv, | |||
748 | if (!skb) | 749 | if (!skb) |
749 | goto out; | 750 | goto out; |
750 | 751 | ||
751 | if (!batadv_send_skb_to_orig(skb, orig_node, NULL)) | 752 | if (batadv_send_skb_to_orig(skb, orig_node, NULL) == NET_XMIT_DROP) |
752 | kfree_skb(skb); | 753 | kfree_skb(skb); |
753 | 754 | ||
754 | out: | 755 | out: |