linux/net/batman-adv
Sven Eckelmann 98052bdaf6
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: 785ea11441 ("batman-adv: Distributed ARP Table - create DHT helper functions")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-07-06 07:18:59 +02:00
..
bat_algo.c batman-adv: store hard_iface as iflink private data 2025-05-31 10:41:11 +02:00
bat_algo.h batman-adv: store hard_iface as iflink private data 2025-05-31 10:41:11 +02:00
bat_iv_ogm.c batman-adv: tvlv: enforce 2-byte alignment 2026-06-14 10:56:35 +02:00
bat_iv_ogm.h batman-adv: Drop publication years from copyright info 2021-02-06 09:22:10 +01:00
bat_v_elp.c batman-adv: convert cancellation of work items to disable helper 2026-06-05 09:12:06 +02:00
bat_v_elp.h batman-adv: Drop unmanaged ELP metric worker 2025-01-22 21:46:42 +01:00
bat_v_ogm.c batman-adv: tvlv: enforce 2-byte alignment 2026-06-14 10:56:35 +02:00
bat_v_ogm.h batman-adv: Drop publication years from copyright info 2021-02-06 09:22:10 +01:00
bat_v.c batman-adv: v: prevent OGM aggregation on disabled hardif 2026-06-13 07:57:52 +02:00
bat_v.h batman-adv: Drop publication years from copyright info 2021-02-06 09:22:10 +01:00
bitarray.c batman-adv: fix kernel-doc typos and grammar errors 2026-06-05 09:12:09 +02:00
bitarray.h batman-adv: fix kernel-doc typos and grammar errors 2026-06-05 09:12:09 +02:00
bridge_loop_avoidance.c batman-adv: bla: update stale kernel-doc 2026-06-05 09:12:08 +02:00
bridge_loop_avoidance.h batman-adv: bla: update stale kernel-doc 2026-06-05 09:12:08 +02:00
distributed-arp-table.c batman-adv: dat: fix tie-break for candidate selection 2026-07-06 07:18:59 +02:00
distributed-arp-table.h batman-adv: Use consistent name for mesh interface 2025-02-22 11:36:22 +01:00
fragmentation.c batman-adv: frag: fix primary_if leak on failed linearization 2026-07-06 07:18:59 +02:00
fragmentation.h batman-adv: frag: ensure fragment is writable before modifying TTL 2026-06-13 07:57:51 +02:00
gateway_client.c batman-adv: gw: acquire ethernet header only after skb realloc 2026-06-28 09:58:22 +02:00
gateway_client.h batman-adv: Check ptr for NULL before reducing its refcnt 2021-08-08 20:21:40 +02:00
gateway_common.c batman-adv: replace non-atomic meshif config fields with (READ|WRITE)_ONCE 2026-06-01 14:22:00 +02:00
gateway_common.h batman-adv: Drop per algo GW section class code 2023-08-14 18:01:21 +02:00
hard-interface.c batman-adv: gw: don't deselect gateway with active hardif 2026-06-13 07:51:17 +02:00
hard-interface.h batman-adv: correct batadv_wifi_* kernel-doc 2026-06-05 09:12:07 +02:00
hash.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
hash.h batman-adv: fix kernel-doc typos and grammar errors 2026-06-05 09:12:09 +02:00
Kconfig batman-adv: use skb_crc32c() instead of skb_seq_read() 2025-10-17 16:30:43 +02:00
log.c batman-adv: Use consistent name for mesh interface 2025-02-22 11:36:22 +01:00
log.h batman-adv: replace non-atomic meshif config fields with (READ|WRITE)_ONCE 2026-06-01 14:22:00 +02:00
main.c batman-adv: clean untagged VLAN on netdev registration failure 2026-07-06 07:18:58 +02:00
main.h batman-adv: drop batman-adv specific version 2026-05-29 21:15:59 +02:00
Makefile batman-adv: drop batman-adv specific version 2026-05-29 21:15:59 +02:00
mesh-interface.c batman-adv: clean untagged VLAN on netdev registration failure 2026-07-06 07:18:58 +02:00
mesh-interface.h batman-adv: clean untagged VLAN on netdev registration failure 2026-07-06 07:18:58 +02:00
multicast_forw.c batman-adv: mcast: avoid OOB read of num_dests header 2026-07-06 07:18:59 +02:00
multicast.c batman-adv: convert cancellation of work items to disable helper 2026-06-05 09:12:06 +02:00
multicast.h batman-adv: mcast: implement multicast packet generation 2023-11-14 08:16:34 +01:00
netlink.c batman-adv: fix kernel-doc typos and grammar errors 2026-06-05 09:12:09 +02:00
netlink.h batman-adv: remove includes for extern declarations 2025-09-05 15:11:02 +02:00
originator.c batman-adv: fix kernel-doc typos and grammar errors 2026-06-05 09:12:09 +02:00
originator.h batman-adv: mcast: implement multicast packet reception and forwarding 2023-11-14 08:16:34 +01:00
routing.c batman-adv: bla: reacquire gw address after skb realloc 2026-06-28 09:58:34 +02:00
routing.h batman-adv: mcast: implement multicast packet reception and forwarding 2023-11-14 08:16:34 +01:00
send.c batman-adv: convert cancellation of work items to disable helper 2026-06-05 09:12:06 +02:00
send.h batman-adv: Use consistent name for mesh interface 2025-02-22 11:36:22 +01:00
tp_meter.c batman-adv: tp_meter: handle overlapping packets 2026-06-13 07:57:52 +02:00
tp_meter.h batman-adv: stop tp_meter sessions during mesh teardown 2026-05-02 21:58:53 +02:00
trace.c batman-adv: Drop publication years from copyright info 2021-02-06 09:22:10 +01:00
trace.h batman-adv: Use consistent name for mesh interface 2025-02-22 11:36:22 +01:00
translation-table.c batman-adv: tt: prevent TVLV OOB check overflow 2026-07-06 07:18:58 +02:00
translation-table.h batman-adv: Use consistent name for mesh interface 2025-02-22 11:36:22 +01:00
tvlv.c batman-adv: tvlv: avoid race of cifsnotfound handler state 2026-06-14 12:33:18 +02:00
tvlv.h batman-adv: tvlv: avoid unnecessary OGM buffer reallocations 2026-06-01 14:22:02 +02:00
types.h batman-adv: tvlv: avoid race of cifsnotfound handler state 2026-06-14 12:33:18 +02:00
version.c batman-adv: drop batman-adv specific version 2026-05-29 21:15:59 +02:00