OSDN Git Service

Bluetooth: 6lowpan: search for destination address in all peers
authorJosua Mayer <josua.mayer@jm0.eu>
Sat, 6 Jul 2019 15:54:46 +0000 (17:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2019 07:33:24 +0000 (09:33 +0200)
commit09c3d4027f8627eddeb6c96bf9885c3be2b51a08
treec5d432faab0e4233132f95a38586752920a84057
parentfa729a351b7a5189ae00fff03852d9ecb79685cd
Bluetooth: 6lowpan: search for destination address in all peers

[ Upstream commit b188b03270b7f8568fc714101ce82fbf5e811c5a ]

Handle overlooked case where the target address is assigned to a peer
and neither route nor gateway exist.

For one peer, no checks are performed to see if it is meant to receive
packets for a given address.

As soon as there is a second peer however, checks are performed
to deal with routes and gateways for handling complex setups with
multiple hops to a target address.
This logic assumed that no route and no gateway imply that the
destination address can not be reached, which is false in case of a
direct peer.

Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Tested-by: Michael Scott <mike@foundries.io>
Signed-off-by: Josua Mayer <josua.mayer@jm0.eu>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/6lowpan.c