public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] alfred and batadv-vis issue
@ 2018-10-18  5:53 gary
  2018-10-18  6:22 ` Sven Eckelmann
  0 siblings, 1 reply; 23+ messages in thread
From: gary @ 2018-10-18  5:53 UTC (permalink / raw)
  To: b.a.t.m.a.n


Hello guys,

I setup a testbed like this.  (BBN = backbone node)

Switch ---------->BBN1 --------------->MP1
        |
		------->BBN2---------------->MP2

MP1 and MP2 may select BBN1 or BBN2 as gateway. 
On both MP1 and MP2, I enable Alfred and batadv-vis as follows:
alfred -i br0 -4 224.0.0.1 -m &
batadv-vis -i bat0 -s

when I run batadv-vis again on MP1, I can't get the info from MP2. 
If I ping the ip address of MP2 from MP1, MP1 will get MP2's mac address by arp.
And then I run batadv-vis again, I can get the data from MP2 now.

Is there any configure or method to get MP2's info without ping test?

Thanks,
Gary

   



^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: [B.A.T.M.A.N.] alfred and batadv-vis issue
@ 2018-10-25 13:40 Jonathan Haws
  0 siblings, 0 replies; 23+ messages in thread
From: Jonathan Haws @ 2018-10-25 13:40 UTC (permalink / raw)
  To: gary, 'Sven Eckelmann'; +Cc: b.a.t.m.a.n@lists.open-mesh.org

Gary,

Interesting. Looking at that code I would think it wouldn't work any different than the original because retries is set to 1, so the first entrance into the first while will reduce that to 0 causing you to never enter that second loop. That should result in the same behavior as if the second loop wasn't even there.

If the second ioctl fails, the request still went out to the other device, so will populate the arp cache for the next sync. That's how it worked in my setup.

Can you give more details on what is not working?

FYI, l'm going to be in the Grand Canyon the next few days and likely won't be able to respond.

Thanks!



Sent from my Verizon, Samsung Galaxy smartphone

-------- Original message --------
From: gary <guohuizou2000@sina.com>
Date: 10/25/18 3:06 AM (GMT-07:00)
To: 'Sven Eckelmann' <sven@narfation.org>, Jonathan Haws <jhaws@sdl.usu.edu>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: RE: [B.A.T.M.A.N.] alfred and batadv-vis issue


Hi Sven and Jon,

The patch does NOT work for me.

I review the code again and find the issue. The following code may make my
testbed work.


--- a/util.c
+++ b/util.c
@@ -122,14 +122,14 @@ int ipv4_arp_request(struct interface *interface,
const alfred_addr *addr,
        arpreq.arp_dev[sizeof(arpreq.arp_dev) - 1] = '\0';

        if (ioctl(interface->netsock, SIOCGARP, &arpreq) < 0)
-               return -1;
-
-       while (retries-- && !(arpreq.arp_flags & ATF_COM)) {
-               ipv4_request_mac_resolve(addr);
-               usleep(200000);
-
-               if (ioctl(interface->netsock, SIOCGARP, &arpreq) < 0)
-                       return -1;
+       {
+               while (retries-- && !(arpreq.arp_flags & ATF_COM)) {
+                       ipv4_request_mac_resolve(addr);
+                       usleep(200000);
+
+                       if (ioctl(interface->netsock, SIOCGARP, &arpreq) <
0)
+                               return -1;
+               }
        }

Regards,
Gary


-----Original Message-----
From: Sven Eckelmann <sven@narfation.org>
Sent: 2018年10月25日 14:15
To: Jonathan Haws <jhaws@sdl.usu.edu>
Cc: guohuizou2000@sina.com; b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] alfred and batadv-vis issue

On Mittwoch, 24. Oktober 2018 18:39:43 CEST Jonathan Haws wrote:
[...]
> I just submitted a patch that pulls the request_mac_resolve() routine
> from batctl, modifies it appropriately, and uses it when MAC
> resolution isn't from the cache.
>
> I've tested this with my VM setup here and it works properly (after I
> verified that the nodes were not sharing messages first).
>
> Gary - can you try the patch with your setup and make sure it solves
> the problem in your setup as well?


The patch can be found at https://patchwork.open-mesh.org/patch/17552/ (or
directly on the mailing list)

Please reply via mail with a line

Tested-by: FirstName LastName <guohuizou2000@sina.com>

when you've successfully tested it (FirstName and LastName have to be
replaced with your actual name).

Kind regards,
        Sven



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2018-10-30 14:27 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-18  5:53 [B.A.T.M.A.N.] alfred and batadv-vis issue gary
2018-10-18  6:22 ` Sven Eckelmann
2018-10-22 17:36   ` Jonathan Haws
2018-10-23  3:02     ` gary
2018-10-23  4:04       ` Jonathan Haws
2018-10-23  6:29         ` Sven Eckelmann
2018-10-23  9:52           ` gary
2018-10-23 10:25             ` Sven Eckelmann
2018-10-23 13:50           ` Jonathan Haws
2018-10-23 14:06             ` Sven Eckelmann
2018-10-23 14:11               ` Jonathan Haws
2018-10-23 14:16                 ` Sven Eckelmann
2018-10-24 18:39                   ` Jonathan Haws
2018-10-25  6:15                     ` Sven Eckelmann
2018-10-25  9:06                       ` gary
2018-10-29 16:07                         ` Jonathan Haws
2018-10-29 16:48                           ` Sven Eckelmann
2018-10-29 17:25                             ` Jonathan Haws
2018-10-29 17:34                               ` Sven Eckelmann
2018-10-30  5:24                           ` gary
2018-10-30 14:20                             ` Jonathan Haws
2018-10-30 14:27                               ` Sven Eckelmann
  -- strict thread matches above, loose matches on Subject: below --
2018-10-25 13:40 Jonathan Haws

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox