diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2016-01-16 09:40:15 +0100 |
---|---|---|
committer | Antonio Quartulli <a@unstable.cc> | 2016-02-29 09:05:32 +0100 |
commit | 95d392784dd0a51e4216e075f04a68c922745985 (patch) | |
tree | 4494e96e8be0cfbe82cb2ad7605a825a01c577ce /net/batman-adv/fragmentation.c | |
parent | batman-adv: add throughput override attribute to hard_ifaces (diff) | |
download | linux-95d392784dd0a51e4216e075f04a68c922745985.tar.xz linux-95d392784dd0a51e4216e075f04a68c922745985.zip |
batman-adv: keep track of when unicast packets are sent
To enable ELP to send probing packets over wireless links
only if needed, batman-adv must keep track of the last time
it sent a unicast packet towards every neighbour.
For this purpose a 2 main changes are introduced:
1) a new member of the elp_neigh_node structure stores the
last time a unicast packet was sent towards this neighbour;
2) a wrapper function for sending unicast packets is
implemented. This function will simply update the member
describe din point 1) and then forward the packet to the
real sending routine.
Point 2) implies that any code-path leading to a unicast
sending now has to use the new wrapper.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv/fragmentation.c')
-rw-r--r-- | net/batman-adv/fragmentation.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c index adb9c3989add..e6956d0746a2 100644 --- a/net/batman-adv/fragmentation.c +++ b/net/batman-adv/fragmentation.c @@ -378,8 +378,7 @@ bool batadv_frag_skb_fwd(struct sk_buff *skb, skb->len + ETH_HLEN); packet->ttl--; - batadv_send_skb_packet(skb, neigh_node->if_incoming, - neigh_node->addr); + batadv_send_unicast_skb(skb, neigh_node); ret = true; } @@ -486,8 +485,7 @@ bool batadv_frag_send_packet(struct sk_buff *skb, batadv_inc_counter(bat_priv, BATADV_CNT_FRAG_TX); batadv_add_counter(bat_priv, BATADV_CNT_FRAG_TX_BYTES, skb_fragment->len + ETH_HLEN); - batadv_send_skb_packet(skb_fragment, neigh_node->if_incoming, - neigh_node->addr); + batadv_send_unicast_skb(skb_fragment, neigh_node); frag_header.no++; /* The initial check in this function should cover this case */ @@ -506,7 +504,7 @@ bool batadv_frag_send_packet(struct sk_buff *skb, batadv_inc_counter(bat_priv, BATADV_CNT_FRAG_TX); batadv_add_counter(bat_priv, BATADV_CNT_FRAG_TX_BYTES, skb->len + ETH_HLEN); - batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); + batadv_send_unicast_skb(skb, neigh_node); ret = true; |