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 creation to the same time of sending, in this way the OGM is first created and then immediately sent.
This patch also removes an insane "-2" that was introduced with 4d30670880c84071dba4b220f595e64d6c01d1ba ("batman-adv: accept delayed rebroadcasts to avoid bogus routing under heavy load") in the OGM seqno validation code that was put there to fix a possible heavy loaded scenario. First that operation shown to be completely not valid and consequently it was creating problem to the new behaviour introduced by this patch
Actually the -2 was not introduced there but was present (in some form) for a much longer time ... something before 2009, didn't trace it to the very end. :)
The reason for this was: * seqno is increased right after scheduling a new (own OGM) * the scheduled OGM was waiting one more cycle before beeing finally sent
Seems we forgot to document this properly, but removing this one is a good idea. :) Your patch thankfully seems to correctly eliminate both reasons for "correcting" the incoming seqno.
I haven't reviewed the rest (don't know if this will stir trouble for the aggregation), but wanted to comment on this history bit. :) Please remove/correct the reference if you merge or send it again.
Thanks! Simon