On Friday 26 February 2016 14:18:39 Andreas Pape wrote:
dat_entry = batadv_dat_entry_hash_find(bat_priv, ip_dst, vid);
- if (!dat_entry)
- if (!dat_entry) {
/* Check if this is a 4addr unicast DAT_DHT_GET frame from
* another backbone gw of the same backbone. If yes, drop
* it as this leads to multiplication of arp requests in bla
* setups as long as there is no dat_entry fo this answer.
* In this case better drop the DHT_GET. Normal bla code
* doesn't take care of these packets as they are tunneled
* via unicast.
*/
unicast_4addr_packet =
(struct batadv_unicast_4addr_packet *)skb->data;
orig_node =
batadv_orig_hash_find(bat_priv,
unicast_4addr_packet->src);
if (orig_node) {
if ((unicast_4addr_packet->u.packet_type ==
BATADV_UNICAST_4ADDR) &&
(unicast_4addr_packet->subtype ==
BATADV_P_DAT_DHT_GET) &&
(batadv_bla_is_backbone_gw(skb, orig_node,
hdr_size))) {
batadv_dbg(BATADV_DBG_DAT, bat_priv, "Doubled ARP request removed: ARP MSG = [src: %pM-%pI4 dst: %pM-%pI4]; originator: %pM\n",
hw_src, &ip_src,
batadv_arp_hw_dst(skb, hdr_size),
&ip_dst, unicast_4addr_packet->src);
ret = true;
}
batadv_orig_node_put(orig_node);
}
- goto out;
- }
This looks really squashed. Maybe this stuff can be moved in a separate function.
Kind regards, Sven