[PATCH v2] Babel: Immediately update hello interval on interface reconfigure.

Ondrej Zajicek santiago at crfreenet.org
Wed Jul 20 12:39:02 CEST 2016


On Wed, Jul 20, 2016 at 11:51:28AM +0200, Toke Høiland-Jørgensen wrote:
> 
> 
> On 20 July 2016 11:46:08 CEST, Ondrej Zajicek <santiago at crfreenet.org> wrote:
> >On Tue, Jul 19, 2016 at 06:34:44PM +0200, Toke Høiland-Jørgensen wrote:
> >> @@ -1538,8 +1541,10 @@ babel_reconfigure_iface(struct babel_proto *p,
> >struct babel_iface *ifa, struct b
> >>    if (new->check_link != old->check_link)
> >>      babel_iface_update_state(ifa);
> >>  
> >> -  if (ifa->up)
> >> +  if (ifa->up) {
> >> +    babel_send_hello(ifa, 0)
> >>      babel_iface_kick_timer(ifa);
> >> +  }
> >
> >Is there a reason to send Hello immediately? If hello_interval is
> >increased, it is applied only after the already scheduled Hello is
> >sent.

> Only consistency: in the current code, changes to the update interval
> are applied immediately, but changes to the hello interval are not. This

Yes, i understand this. My question meant why also to send Hello immediately,
if the interval was already changed in the patch by this:

+  if (ifa->next_hello > (now + new->hello_interval))
+    ifa->next_hello = now + (random() % new->hello_interval) + 1;

IMHO without the babel_send_hello(), you get more consistent behavior
between Hellos and Updates, as both got rescheduled just by changing
next_* variable, not immediately sent.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."



More information about the Bird-users mailing list