Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 951c44e0 authored by Sven Eckelmann's avatar Sven Eckelmann Committed by Greg Kroah-Hartman
Browse files

Staging: batman-adv: Use kernel functions to identify broadcasts



linux/etherdevice.h already provides functions to classify different
ethernet addresses. These inlineable functions should be used instead of
custom functions.

The check for multicast together with multicast can also be replaced
with a single test for multicast because for every ethernet address x
following is always true:

is_broadcast_ether_addr(x) => is_multicast_ether_addr(x)

or when looking more at the implementation:

(FF:FF:FF:FF:FF:FF == x) => [(01:00:00:00:00:00 & x) != 00:00:00:00:00:00]

Reported-by: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarSven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8cab2fbe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment