ble_mesh: Rework prov pdu length check

This commit is contained in:
lly 2020-06-01 20:26:14 +08:00
parent 3f57aecabd
commit a96e1b80ac
2 changed files with 2 additions and 2 deletions

View file

@ -1546,7 +1546,7 @@ static void gen_prov_start(struct prov_rx *rx, struct net_buf_simple *buf)
if (link.rx.buf->len > link.rx.buf->size) {
BT_ERR("%s, Too large provisioning PDU (%u bytes)",
__func__, link.rx.buf->len);
/* Zephyr uses prov_send_fail_msg() here */
prov_send_fail_msg(PROV_ERR_NVAL_FMT);
return;
}

View file

@ -3039,7 +3039,7 @@ static void gen_prov_start(const u8_t idx, struct prov_rx *rx, struct net_buf_si
if (link[idx].rx.buf->len > link[idx].rx.buf->size) {
BT_ERR("%s, Too large provisioning PDU (%u bytes)",
__func__, link[idx].rx.buf->len);
// close_link(i, CLOSE_REASON_FAILED);
close_link(idx, CLOSE_REASON_FAILED);
return;
}