|
@@ -985,15 +985,17 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,
|
|
{
|
|
{
|
|
struct batadv_priv *bat_priv = netdev_priv(recv_if->soft_iface);
|
|
struct batadv_priv *bat_priv = netdev_priv(recv_if->soft_iface);
|
|
struct batadv_unicast_packet *unicast_packet;
|
|
struct batadv_unicast_packet *unicast_packet;
|
|
|
|
+ struct batadv_unicast_4addr_packet *unicast_4addr_packet;
|
|
int hdr_size = sizeof(*unicast_packet);
|
|
int hdr_size = sizeof(*unicast_packet);
|
|
bool is4addr;
|
|
bool is4addr;
|
|
|
|
|
|
unicast_packet = (struct batadv_unicast_packet *)skb->data;
|
|
unicast_packet = (struct batadv_unicast_packet *)skb->data;
|
|
|
|
+ unicast_4addr_packet = (struct batadv_unicast_4addr_packet *)skb->data;
|
|
|
|
|
|
is4addr = unicast_packet->header.packet_type == BATADV_UNICAST_4ADDR;
|
|
is4addr = unicast_packet->header.packet_type == BATADV_UNICAST_4ADDR;
|
|
/* the caller function should have already pulled 2 bytes */
|
|
/* the caller function should have already pulled 2 bytes */
|
|
if (is4addr)
|
|
if (is4addr)
|
|
- hdr_size = sizeof(struct batadv_unicast_4addr_packet);
|
|
|
|
|
|
+ hdr_size = sizeof(*unicast_4addr_packet);
|
|
|
|
|
|
if (batadv_check_unicast_packet(skb, hdr_size) < 0)
|
|
if (batadv_check_unicast_packet(skb, hdr_size) < 0)
|
|
return NET_RX_DROP;
|
|
return NET_RX_DROP;
|
|
@@ -1003,6 +1005,10 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,
|
|
|
|
|
|
/* packet for me */
|
|
/* packet for me */
|
|
if (batadv_is_my_mac(unicast_packet->dest)) {
|
|
if (batadv_is_my_mac(unicast_packet->dest)) {
|
|
|
|
+ if (is4addr)
|
|
|
|
+ batadv_dat_inc_counter(bat_priv,
|
|
|
|
+ unicast_4addr_packet->subtype);
|
|
|
|
+
|
|
if (batadv_dat_snoop_incoming_arp_request(bat_priv, skb,
|
|
if (batadv_dat_snoop_incoming_arp_request(bat_priv, skb,
|
|
hdr_size))
|
|
hdr_size))
|
|
goto rx_success;
|
|
goto rx_success;
|