[Babel-users] the costs of periodic disassociation in conventional ap/sta mode

Juliusz Chroboczek jch at pps.univ-paris-diderot.fr
Thu Jun 16 22:46:57 UTC 2016


> In the new lab I ended up connecting up a bunch of machines in sta mode
> over wpa [...] It doesn't help that I'm also trying to make a major
> change in how wifi is queued underneath...

You didn't mention that you did this while running a production network on
a heterogeneous mixture of buggy and less-buggy hardware, with different
kernel versions, different versions of the wireless drivers (some very
experimental), and different versions of babeld (some badly obsolete, some
experimental).  There's also a wireless bridge introducing further
uncertainty, but you don't know where it is (it answers pings, but you
cannot remember where you put it).

Yeah, sounds like you, Dave ;-)

> A) Powersave enabled caused stas to drop off the net by missing multicast.

Noted.

> good fixes for this problem include [...] having babel be aware it is in
> powersave mode and using a bit of unicast, or something, to keep itself
> alive.

Patch attached.  You test, we speak.  Agree?

> B) Network Manager triggered scans were devastating[1],

Look, Dave, I'm really full of good will.  I once spent a week of my life
looking at systemd, then I uninstalled it from all my machines.  I tried
to do the same with NM, but gave up after a few days.

I'll try again some day.  Just not now.

-- Juliusz

diff --git a/message.c b/message.c
index fdc1999..6b4eefc 100644
--- a/message.c
+++ b/message.c
@@ -1608,6 +1608,7 @@ send_ihu(struct neighbour *neigh, struct interface *ifp)
     int ll;
     int send_rtt_data;
     int msglen;
+    int rc;
 
     if(neigh == NULL && ifp == NULL) {
         struct interface *ifp_aux;
@@ -1638,12 +1639,8 @@ send_ihu(struct neighbour *neigh, struct interface *ifp)
     rxcost = neighbour_rxcost(neigh);
     interval = (ifp->hello_interval * 3 + 9) / 10;
 
-    /* Conceptually, an IHU is a unicast message.  We usually send them as
-       multicast, since this allows aggregation into a single packet and
-       avoids an ARP exchange.  If we already have a unicast message queued
-       for this neighbour, however, we might as well piggyback the IHU. */
     debugf("Sending %sihu %d on %s to %s.\n",
-           unicast_neighbour == neigh ? "unicast " : "",
+           "unicast ",
            rxcost,
            neigh->ifp->name,
            format_address(neigh->address));
@@ -1663,44 +1660,24 @@ send_ihu(struct neighbour *neigh, struct interface *ifp)
        optional 10-bytes sub-TLV for timestamps (used to compute a RTT). */
     msglen = (ll ? 14 : 22) + (send_rtt_data ? 10 : 0);
 
-    if(unicast_neighbour != neigh) {
-        start_message(ifp, MESSAGE_IHU, msglen);
-        accumulate_byte(ifp, ll ? 3 : 2);
-        accumulate_byte(ifp, 0);
-        accumulate_short(ifp, rxcost);
-        accumulate_short(ifp, interval);
-        if(ll)
-            accumulate_bytes(ifp, neigh->address + 8, 8);
-        else
-            accumulate_bytes(ifp, neigh->address, 16);
-        if(send_rtt_data) {
-            accumulate_byte(ifp, SUBTLV_TIMESTAMP);
-            accumulate_byte(ifp, 8);
-            accumulate_int(ifp, neigh->hello_send_us);
-            accumulate_int(ifp, time_us(neigh->hello_rtt_receive_time));
-        }
-        end_message(ifp, MESSAGE_IHU, msglen);
-    } else {
-        int rc;
-        rc = start_unicast_message(neigh, MESSAGE_IHU, msglen);
-        if(rc < 0) return;
-        accumulate_unicast_byte(neigh, ll ? 3 : 2);
-        accumulate_unicast_byte(neigh, 0);
-        accumulate_unicast_short(neigh, rxcost);
-        accumulate_unicast_short(neigh, interval);
-        if(ll)
-            accumulate_unicast_bytes(neigh, neigh->address + 8, 8);
-        else
-            accumulate_unicast_bytes(neigh, neigh->address, 16);
-        if(send_rtt_data) {
-            accumulate_unicast_byte(neigh, SUBTLV_TIMESTAMP);
-            accumulate_unicast_byte(neigh, 8);
-            accumulate_unicast_int(neigh, neigh->hello_send_us);
-            accumulate_unicast_int(neigh,
-                                   time_us(neigh->hello_rtt_receive_time));
-        }
-        end_unicast_message(neigh, MESSAGE_IHU, msglen);
+    rc = start_unicast_message(neigh, MESSAGE_IHU, msglen);
+    if(rc < 0) return;
+    accumulate_unicast_byte(neigh, ll ? 3 : 2);
+    accumulate_unicast_byte(neigh, 0);
+    accumulate_unicast_short(neigh, rxcost);
+    accumulate_unicast_short(neigh, interval);
+    if(ll)
+        accumulate_unicast_bytes(neigh, neigh->address + 8, 8);
+    else
+        accumulate_unicast_bytes(neigh, neigh->address, 16);
+    if(send_rtt_data) {
+        accumulate_unicast_byte(neigh, SUBTLV_TIMESTAMP);
+        accumulate_unicast_byte(neigh, 8);
+        accumulate_unicast_int(neigh, neigh->hello_send_us);
+        accumulate_unicast_int(neigh,
+                               time_us(neigh->hello_rtt_receive_time));
     }
+    end_unicast_message(neigh, MESSAGE_IHU, msglen);
 }
 
 /* Send IHUs to all marginal neighbours */



More information about the Babel-users mailing list