public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Jonathan Haws <jhaws@sdl.usu.edu>
Subject: Re: [B.A.T.M.A.N.] [PATCH] IPv4 multicast distribution support.
Date: Tue, 17 Jan 2017 08:44:53 +0100	[thread overview]
Message-ID: <4570303.DAXUuCGGu2@bentobox> (raw)
In-Reply-To: <1484596174-16341-1-git-send-email-jhaws@sdl.usu.edu>

[-- Attachment #1: Type: text/plain, Size: 2316 bytes --]

Patch subject prefix is wrong (actually, it is missing).

On Montag, 16. Januar 2017 12:49:34 CET Jonathan Haws wrote:
> +int ipv4_to_mac(const alfred_addr *addr, struct ether_addr *mac)
> +{
> +  mac->ether_addr_octet[0] = 0;
> +  mac->ether_addr_octet[1] = 0;
> +  mac->ether_addr_octet[2] = (addr->ipv4.s_addr >> 24) & 0xFF;
> +  mac->ether_addr_octet[3] = (addr->ipv4.s_addr >> 16) & 0xFF;
> +  mac->ether_addr_octet[4] = (addr->ipv4.s_addr >>  8) & 0xFF;
> +  mac->ether_addr_octet[5] = (addr->ipv4.s_addr >>  0) & 0xFF;
> +
> +  if (!is_valid_ether_addr(mac->ether_addr_octet))
> +    return -EINVAL;
> +
> +  return 0;
> +}


This will not return the mac address of the device. It will therefore break
the synchronization code. see SOURCE_FIRST_HAND in sync_data and the code
which sets data_source in finish_alfred_push_data.

On Montag, 16. Januar 2017 12:49:34 CET Jonathan Haws wrote:
> @@ -61,6 +62,7 @@ static void alfred_usage(void)
>         printf("                                      other masters\n");
>         printf("  -p, --sync-period [period]          set synchronization period, in seconds\n");
>         printf("                                      fractional seconds are supported (i.e. 0.2 = 5 Hz)\n");
> +       printf("  -4                                  specify IPv4 multicast address and operate in IPv4 mode");
>         printf("\n");
>         printf("  -u, --unix-path [path]              path to unix socket used for client-server\n");
>         printf("                                      communication (default: \""ALFRED_SOCK_PATH_DEFAULT"\")\n");


The documentation is wrong. It requires an argument but the argument is not
shown.

Same problem in the manpage.

On Montag, 16. Januar 2017 19:52:41 CET Jonathan Haws wrote:
> I realize that the code in this patch is not formatted properly, but I
> was unable to get checkpatch.pl to scan this right - it needs a full
> kernel tree.  Is there another formatting script I can run?

What is the problem with downloading the kernel sources? And auto-formatting
scripts tend to not get everything right and make things worse in some cases.
checkpatch.pl is therefore only to point out some obvious problems.

For example that you are replace tabs (8 spaces wide in alfred code) sometimes
with 2 spaces.

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2017-01-17  7:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 19:49 [B.A.T.M.A.N.] [PATCH] IPv4 multicast distribution support Jonathan Haws
2017-01-16 19:52 ` Jonathan Haws
2017-01-17  7:44 ` Sven Eckelmann [this message]
2017-01-17 15:39   ` Jonathan Haws
2017-01-17 16:54     ` Sven Eckelmann
2017-01-17 19:11       ` Linus Lüssing
2017-01-18  5:12       ` Jonathan Haws
2017-01-18  8:11         ` Sven Eckelmann
2017-01-17 19:30 ` Linus Lüssing
2017-01-18  5:06   ` Jonathan Haws

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=4570303.DAXUuCGGu2@bentobox \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=jhaws@sdl.usu.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox