aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/distributed-arp-table.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/distributed-arp-table.c')
-rw-r--r--net/batman-adv/distributed-arp-table.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index c1a74a126f58..8e1d89d2b1c1 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -601,9 +601,22 @@ static bool batadv_dat_send_data(struct batadv_priv *bat_priv,
601 send_status = batadv_send_skb_packet(tmp_skb, 601 send_status = batadv_send_skb_packet(tmp_skb,
602 neigh_node->if_incoming, 602 neigh_node->if_incoming,
603 neigh_node->addr); 603 neigh_node->addr);
604 if (send_status == NET_XMIT_SUCCESS) 604 if (send_status == NET_XMIT_SUCCESS) {
605 /* count the sent packet */
606 switch (packet_subtype) {
607 case BATADV_P_DAT_DHT_GET:
608 batadv_inc_counter(bat_priv,
609 BATADV_CNT_DAT_GET_TX);
610 break;
611 case BATADV_P_DAT_DHT_PUT:
612 batadv_inc_counter(bat_priv,
613 BATADV_CNT_DAT_PUT_TX);
614 break;
615 }
616
605 /* packet sent to a candidate: return true */ 617 /* packet sent to a candidate: return true */
606 ret = true; 618 ret = true;
619 }
607free_neigh: 620free_neigh:
608 batadv_neigh_node_free_ref(neigh_node); 621 batadv_neigh_node_free_ref(neigh_node);
609free_orig: 622free_orig:
@@ -909,8 +922,10 @@ bool batadv_dat_snoop_incoming_arp_request(struct batadv_priv *bat_priv,
909 else 922 else
910 err = batadv_unicast_send_skb(bat_priv, skb_new); 923 err = batadv_unicast_send_skb(bat_priv, skb_new);
911 924
912 if (!err) 925 if (!err) {
926 batadv_inc_counter(bat_priv, BATADV_CNT_DAT_CACHED_REPLY_TX);
913 ret = true; 927 ret = true;
928 }
914out: 929out:
915 if (dat_entry) 930 if (dat_entry)
916 batadv_dat_entry_free_ref(dat_entry); 931 batadv_dat_entry_free_ref(dat_entry);