Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340705
b: refs/heads/master
c: 9affec6
h: refs/heads/master
i:
  340703: 480469b
v: v3
  • Loading branch information
Antonio Quartulli committed Nov 7, 2012
1 parent a63c966 commit cdbfaca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4046b24aface62f5647699e9af3260a486bc5f49
refs/heads/master: 9affec6be810d1d529cb9dc95126119451696ba6
12 changes: 10 additions & 2 deletions trunk/net/batman-adv/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,8 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,
struct batadv_priv *bat_priv = netdev_priv(recv_if->soft_iface);
struct batadv_unicast_packet *unicast_packet;
struct batadv_unicast_4addr_packet *unicast_4addr_packet;
uint8_t *orig_addr;
struct batadv_orig_node *orig_node = NULL;
int hdr_size = sizeof(*unicast_packet);
bool is4addr;

Expand All @@ -1005,9 +1007,12 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,

/* packet for me */
if (batadv_is_my_mac(unicast_packet->dest)) {
if (is4addr)
if (is4addr) {
batadv_dat_inc_counter(bat_priv,
unicast_4addr_packet->subtype);
orig_addr = unicast_4addr_packet->src;
orig_node = batadv_orig_hash_find(bat_priv, orig_addr);
}

if (batadv_dat_snoop_incoming_arp_request(bat_priv, skb,
hdr_size))
Expand All @@ -1017,9 +1022,12 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,
goto rx_success;

batadv_interface_rx(recv_if->soft_iface, skb, recv_if, hdr_size,
NULL);
orig_node);

rx_success:
if (orig_node)
batadv_orig_node_free_ref(orig_node);

return NET_RX_SUCCESS;
}

Expand Down

0 comments on commit cdbfaca

Please sign in to comment.