diff options
| author | Sven Eckelmann <sven@narfation.org> | 2026-07-02 19:32:40 +0200 |
|---|---|---|
| committer | Sven Eckelmann <sven@narfation.org> | 2026-07-06 07:18:59 +0200 |
| commit | 98052bdaf6ac1639a63ffc10244eeeab1f62ed2b (patch) | |
| tree | 275c86bfada98d72321f3bf75b251e0c5019dac1 /include | |
| parent | 38eaed28e250895d56f4b7989bd65479a511c5c3 (diff) | |
batman-adv: dat: fix tie-break for candidate selection
The original version of the candidate selection for DAT attempted to
compare both candidate and max_orig_node to identify which has the smaller
MAC address. This comparison is required as tie-break when a hash collision
happened.
But the used function returned 0 when the function was not equal and a
non-zero value when it was equal. As result, the actually selected
node was dependent on the order of entries in the orig_hash and not
actually on the mac addresses. The last originator in the hash collision
would always win.
To have a proper ordering, it must diff the actual MAC address bytes and
reject the candidate when the diff is not smaller than 0.
Cc: stable@vger.kernel.org
Fixes: 785ea1144182 ("batman-adv: Distributed ARP Table - create DHT helper functions")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
