diff options
author | Linus Lüssing <linus.luessing@web.de> | 2013-07-03 04:40:00 -0400 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2013-10-19 11:31:54 -0400 |
commit | e300d314664ef6746e697d5b581f85114ab1f843 (patch) | |
tree | 8496c328c2590f0ca0cf91a1325794fe2c0d44d4 /net/batman-adv/distributed-arp-table.c | |
parent | b8cbd81d0944cd2dc097b2b4ae8adaf639c5b4df (diff) |
batman-adv: refine API calls for unicast transmissions of SKBs
With this patch the functions batadv_send_skb_unicast() and
batadv_send_skb_unicast_4addr() are further refined into
batadv_send_skb_via_tt(), batadv_send_skb_via_tt_4addr() and
batadv_send_skb_via_gw(). This way we avoid any "guessing" about where to send
a packet in the unicast forwarding methods and let the callers decide.
This is going to be useful for the upcoming multicast related patches in
particular.
Further, the return values were polished a little to use the more
appropriate NET_XMIT_* defines.
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Acked-by: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Diffstat (limited to 'net/batman-adv/distributed-arp-table.c')
-rw-r--r-- | net/batman-adv/distributed-arp-table.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c index 47dbe9a53e91..6c8c3934bd7b 100644 --- a/net/batman-adv/distributed-arp-table.c +++ b/net/batman-adv/distributed-arp-table.c | |||
@@ -1037,13 +1037,13 @@ bool batadv_dat_snoop_incoming_arp_request(struct batadv_priv *bat_priv, | |||
1037 | * that a node not using the 4addr packet format doesn't support it. | 1037 | * that a node not using the 4addr packet format doesn't support it. |
1038 | */ | 1038 | */ |
1039 | if (hdr_size == sizeof(struct batadv_unicast_4addr_packet)) | 1039 | if (hdr_size == sizeof(struct batadv_unicast_4addr_packet)) |
1040 | err = batadv_send_skb_unicast_4addr(bat_priv, skb_new, | 1040 | err = batadv_send_skb_via_tt_4addr(bat_priv, skb_new, |
1041 | BATADV_P_DAT_CACHE_REPLY, | 1041 | BATADV_P_DAT_CACHE_REPLY, |
1042 | vid); | 1042 | vid); |
1043 | else | 1043 | else |
1044 | err = batadv_send_skb_unicast(bat_priv, skb_new, vid); | 1044 | err = batadv_send_skb_via_tt(bat_priv, skb_new, vid); |
1045 | 1045 | ||
1046 | if (!err) { | 1046 | if (err != NET_XMIT_DROP) { |
1047 | batadv_inc_counter(bat_priv, BATADV_CNT_DAT_CACHED_REPLY_TX); | 1047 | batadv_inc_counter(bat_priv, BATADV_CNT_DAT_CACHED_REPLY_TX); |
1048 | ret = true; | 1048 | ret = true; |
1049 | } | 1049 | } |