From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: a@unstable.cc
Subject: Host endianness dependent DHT lookup
Date: Thu, 28 Nov 2019 11:01:24 +0100 [thread overview]
Message-ID: <1815609.duLnqLk4gF@sven-edge> (raw)
[-- Attachment #1: Type: text/plain, Size: 565 bytes --]
Hi,
I just saw following in batadv_hash_dat():
key = (const unsigned char *)&dat->vid;
for (i = 0; i < sizeof(dat->vid); i++) {
hash += key[i];
hash += (hash << 10);
hash ^= (hash >> 6);
}
But the vid is in host order - not big endian like the IP part. So the
batadv_dat_select_candidates will select different candidates depending on
whether it is a little or big endian system, right?
If this is a correct assumption, then we would have this problem since
3e26722bc9f2 ("batman-adv: make the Distributed ARP Table vlan aware")
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2019-11-28 10:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-28 10:01 Sven Eckelmann [this message]
2019-11-28 10:13 ` Host endianness dependent DHT lookup Antonio Quartulli
2019-11-28 10:15 ` Sven Eckelmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1815609.duLnqLk4gF@sven-edge \
--to=sven@narfation.org \
--cc=a@unstable.cc \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox