On Tue, Jun 26, 2012 at 11:45:37PM +0200, Matthias Schiffer wrote:
On 06/26/2012 11:22 PM, Sven Eckelmann wrote:
On Tuesday 26 June 2012 22:00:20 Antonio Quartulli wrote:
In case of client-roaming it would be useful to carry TT flags along with the client entry. Information contained in the flags could be used on the new mesh node for several reasons (e.g. particular roaming treatment).
This patch modifies the ROAMING_ADV packet according to this idea so that it can also carry the flags together with the MAC address of the moving client.
Signed-off-by: Antonio Quartulli ordex@autistici.org
packet.h | 2 +- routing.c | 7 ++++--- translation-table.c | 17 ++++++++++------- 3 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/packet.h b/packet.h index 65d66e4..e0b94a3 100644 --- a/packet.h +++ b/packet.h @@ -214,7 +214,7 @@ struct batadv_tt_query_packet {
struct batadv_roam_adv_packet { struct batadv_header header;
- uint8_t reserved;
- uint8_t flags; uint8_t dst[ETH_ALEN]; uint8_t src[ETH_ALEN]; uint8_t client[ETH_ALEN];
I am not 100% sure because I haven't checked the code, but couldn't it be the case that we send random bits inside reserved at the moment? At least I cannot remember the part of the code that initialized reserver to any specific value. That would make the change incompatible with older batman-adv version.
As stated in an earlier mail, the `reserved' field in the vis packets isn't initialized either, leading to the same problem, being unable to ever use this field for anything when you want to stay compatible with older versions.
IMO this should be fixed in all packets, it's a really bad idea to send uninitialized memory over the network...
Yes, I agree. we have to remember this fix the next time we decide to break compatibility. I don't think we are going to do it now.
Cheers,