Re: [B.A.T.M.A.N.] [RFC] batman-adv: postpone OGM preparation to sending time

2012-12-13 Thread Antonio Quartulli
On Tue, Dec 11, 2012 at 10:57:24PM +0100, Antonio Quartulli wrote: [...] /* when do we schedule a ogm packet to be sent */ static unsigned long batadv_iv_ogm_fwd_send_time(void) { - return jiffies + msecs_to_jiffies(random32() % (BATADV_JITTER / 2)); + return jiffies +

[B.A.T.M.A.N.] [RFC] batman-adv: postpone OGM preparation to sending time

2012-12-11 Thread Antonio Quartulli
OGMs are currently prepared 1 originator interval in advance then the time they are used to be sent. This means that once in the air they carry old information (e.g. TT announcements). To fix this, postpone the OGM creation to the same time of sending, in this way the OGM is first created and

Re: [B.A.T.M.A.N.] [RFC] batman-adv: postpone OGM preparation to sending time

2012-12-11 Thread Simon Wunderlich
On Tue, Dec 11, 2012 at 10:57:24PM +0100, Antonio Quartulli wrote: OGMs are currently prepared 1 originator interval in advance then the time they are used to be sent. This means that once in the air they carry old information (e.g. TT announcements). To fix this, postpone the OGM