From: Marek Lindner <lindner_marek@yahoo.de>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCHv2 1/7] batman-adv: Return reason for failure in batadv_check_unicast_packet()
Date: Sat, 15 Dec 2012 16:10:17 +0800 [thread overview]
Message-ID: <201212151610.17929.lindner_marek@yahoo.de> (raw)
In-Reply-To: <e283ab952a3393aa0128d377436bc127cedd244a.1355466678.git.martin@hundeboll.net>
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
next prev parent reply other threads:[~2012-12-15 8:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 6:32 [B.A.T.M.A.N.] [PATCHv2 0/7] CATWOMAN: Network coding in batman-adv Martin Hundebøll
2012-12-14 6:32 ` [B.A.T.M.A.N.] [PATCHv2 1/7] batman-adv: Return reason for failure in batadv_check_unicast_packet() Martin Hundebøll
2012-12-15 8:10 ` Marek Lindner [this message]
2012-12-15 12:39 ` Antonio Quartulli
2012-12-14 6:32 ` [B.A.T.M.A.N.] [PATCHv2 2/7] batman-adv: Add the initial code for network coding Martin Hundebøll
2012-12-15 13:15 ` Antonio Quartulli
2012-12-14 6:32 ` [B.A.T.M.A.N.] [PATCHv2 3/7] batman-adv: Detect coding nodes and remove these after timeout Martin Hundebøll
2012-12-18 22:54 ` Antonio Quartulli
2012-12-14 6:32 ` [B.A.T.M.A.N.] [PATCHv2 4/7] batman-adv: Buffer unicast packets before forward Martin Hundebøll
2012-12-18 22:54 ` Antonio Quartulli
2012-12-14 6:32 ` [B.A.T.M.A.N.] [PATCHv2 5/7] batman-adv: Code and transmit packets if possible Martin Hundebøll
2012-12-14 6:32 ` [B.A.T.M.A.N.] [PATCHv2 6/7] batman-adv: Save overheard and tx packets for decoding Martin Hundebøll
2012-12-14 6:32 ` [B.A.T.M.A.N.] [PATCHv2 7/7] batman-adv: Receive coded packets and decode them Martin Hundebøll
2012-12-15 8:13 ` [B.A.T.M.A.N.] [PATCHv2 0/7] CATWOMAN: Network coding in batman-adv Marek Lindner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201212151610.17929.lindner_marek@yahoo.de \
--to=lindner_marek@yahoo.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.