Skip to content

Commit

Permalink
Bluetooth: Mesh: Fix SDU length check
Browse files Browse the repository at this point in the history
The code was passing the wrong first parameter to the sdu_len_is_ok()
function.

Fixes #3985
Fixes #3984

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
  • Loading branch information
jhedberg authored and Anas Nashif committed Oct 19, 2017
1 parent 92f5487 commit 971080c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/mesh/transport.c
Expand Up @@ -980,7 +980,7 @@ static int trans_seg(struct net_buf_simple *buf, struct bt_mesh_net_rx *net_rx)
}

/* Bail out early if we're not ready to receive such a large SDU */
if (!sdu_len_is_ok(&net_rx->ctx, seg_n)) {
if (!sdu_len_is_ok(net_rx->ctl, seg_n)) {
BT_ERR("Too big incoming SDU length");
send_ack(net_rx->sub, net_rx->dst, net_rx->ctx.addr,
net_rx->ctx.send_ttl, seq_zero, 0);
Expand Down

0 comments on commit 971080c

Please sign in to comment.