On Friday, December 14, 2012 14:32:46 Martin Hundebøll wrote:
static int batadv_check_unicast_packet(struct sk_buff *skb, int hdr_size) { struct ethhdr *ethhdr; @@ -564,15 +574,15 @@ static int batadv_check_unicast_packet(struct sk_buff *skb, int hdr_size)
/* packet with unicast indication but broadcast recipient */ if (is_broadcast_ether_addr(ethhdr->h_dest))
return -1;
return -2;
/* packet with broadcast sender address */ if (is_broadcast_ether_addr(ethhdr->h_source))
return -1;
return -3;
/* not for me */ if (!batadv_is_my_mac(ethhdr->h_dest))
return -1;
return -4;
return 0;
}
Returning meaningless numbers isn't the way to go. Either we make our own defines or we re-use our E***** friends.
By the way, I suggest to send this patch separately. It increases the chance of getting merged faster and reduces your patchset.
Cheers, Marek