From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marek Lindner Date: Sat, 15 Dec 2012 16:10:17 +0800 References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201212151610.17929.lindner_marek@yahoo.de> Subject: Re: [B.A.T.M.A.N.] [PATCHv2 1/7] batman-adv: Return reason for failure in batadv_check_unicast_packet() Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: The list for a Better Approach To Mobile Ad-hoc Networking On Friday, December 14, 2012 14:32:46 Martin Hundeb=C3=B8ll 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_bu= ff > *skb, int hdr_size) >=20 > /* packet with unicast indication but broadcast recipient */ > if (is_broadcast_ether_addr(ethhdr->h_dest)) > - return -1; > + return -2; >=20 > /* packet with broadcast sender address */ > if (is_broadcast_ether_addr(ethhdr->h_source)) > - return -1; > + return -3; >=20 > /* not for me */ > if (!batadv_is_my_mac(ethhdr->h_dest)) > - return -1; > + return -4; >=20 > return 0; > } Returning meaningless numbers isn't the way to go. Either we make our own=20 defines or we re-use our E***** friends. By the way, I suggest to send this patch separately. It increases the chanc= e=20 of getting merged faster and reduces your patchset. Cheers, Marek