Bluetooth: Mesh: Allow TTL <= 1 for the local net interface

The bt_mesh_net_relay() function needs to allow TTL <= 1 for the local
network interface since that's the code path that locally originated
outgoing packets take.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-09-27 14:36:46 +03:00 committed by Johan Hedberg
parent 418cdadeab
commit 76fd02ee0c

View file

@ -988,7 +988,7 @@ static void bt_mesh_net_relay(struct net_buf_simple *sbuf,
BT_DBG("TTL %u CTL %u dst 0x%04x", rx->ctx.recv_ttl, CTL(sbuf->data),
rx->dst);
if (rx->ctx.recv_ttl <= 1) {
if (rx->net_if != BT_MESH_NET_IF_LOCAL && rx->ctx.recv_ttl <= 1) {
return;
}