mesh: Check TTL max value on transport TX

Adds check for TTL max in the transport send functions, and moves
setting of default TTL to transport.

this is port of a2aad2b3f80e60415b1210ab0b3f487854ee6b26
diff --git a/apps/mesh_badge/src/mesh.c b/apps/mesh_badge/src/mesh.c
index b19eeaf..ee99917 100644
--- a/apps/mesh_badge/src/mesh.c
+++ b/apps/mesh_badge/src/mesh.c
@@ -27,8 +27,6 @@
 static struct ble_npl_callout hello_work;
 static struct ble_npl_callout mesh_start_work;
 
-struct bt_mesh_hb_cb hb_cb;
-
 static void heartbeat(const struct bt_mesh_hb_sub *sub, uint8_t hops,
 		      uint16_t feat)
 {
diff --git a/nimble/host/mesh/src/net.c b/nimble/host/mesh/src/net.c
index 5db7b50..c19a535 100644
--- a/nimble/host/mesh/src/net.c
+++ b/nimble/host/mesh/src/net.c
@@ -456,10 +456,6 @@
 	BT_DBG("Payload len %u: %s", buf->om_len, bt_hex(buf->om_data, buf->om_len));
 	BT_DBG("Seq 0x%06x", bt_mesh.seq);
 
-	if (tx->ctx->send_ttl == BT_MESH_TTL_DEFAULT) {
-		tx->ctx->send_ttl = bt_mesh_default_ttl_get();
-	}
-
 	cred = net_tx_cred_get(tx);
 	err = net_header_encode(tx, cred->nid, buf);
 	if (err) {
diff --git a/nimble/host/mesh/src/transport.c b/nimble/host/mesh/src/transport.c
index c4ed595..66e1982 100644
--- a/nimble/host/mesh/src/transport.c
+++ b/nimble/host/mesh/src/transport.c
@@ -488,11 +488,7 @@
 	tx->started = 0;
 	tx->ctl = !!ctl_op;
 
-	if (net_tx->ctx->send_ttl == BT_MESH_TTL_DEFAULT) {
-		tx->ttl = bt_mesh_default_ttl_get();
-	} else {
-		tx->ttl = net_tx->ctx->send_ttl;
-	}
+	tx->ttl = net_tx->ctx->send_ttl;
 
 	BT_DBG("SeqZero 0x%04x (segs: %u)",
 	       (uint16_t)(tx->seq_auth & TRANS_SEQ_ZERO_MASK), tx->nack_count);
@@ -627,6 +623,13 @@
 		return -EINVAL;
 	}
 
+	if (tx->ctx->send_ttl == BT_MESH_TTL_DEFAULT) {
+		tx->ctx->send_ttl = bt_mesh_default_ttl_get();
+	} else if (tx->ctx->send_ttl > BT_MESH_TTL_MAX) {
+		BT_ERR("TTL too large (max 127)");
+		return -EINVAL;
+	}
+
 	if (msg->om_len > BT_MESH_SDU_UNSEG_MAX) {
 		tx->ctx->send_rel = 1;
 		tx->ctx->send_rel = true;
@@ -988,6 +991,13 @@
 
 	net_buf_simple_init_with_data(buf, data, data_len);
 
+	if (tx->ctx->send_ttl == BT_MESH_TTL_DEFAULT) {
+		tx->ctx->send_ttl = bt_mesh_default_ttl_get();
+	} else if (tx->ctx->send_ttl > BT_MESH_TTL_MAX) {
+		BT_ERR("TTL too large (max 127)");
+		return -EINVAL;
+	}
+
 	if (data_len > BT_MESH_SDU_UNSEG_MAX) {
 		tx->ctx->send_rel = true;
 	}
diff --git a/nimble/host/mesh/syscfg.yml b/nimble/host/mesh/syscfg.yml
index e7a3289..4a9fd40 100644
--- a/nimble/host/mesh/syscfg.yml
+++ b/nimble/host/mesh/syscfg.yml
@@ -473,34 +473,30 @@
             Controls whether the Friend feature is enabled by default. Can be
             changed through runtime configuration.
         value: 1
-        restrictions: BLE_MESH_FRIEND
 
     BLE_MESH_FRIEND_RECV_WIN:
         description: >
             Receive Window in milliseconds supported by the Friend node.
         value: 255
-        restrictions: BLE_MESH_FRIEND
 
     BLE_MESH_FRIEND_QUEUE_SIZE:
         description: >
             Minimum number of buffers available to be stored for each
             local Friend Queue.
         value: 16
-        restrictions: BLE_MESH_FRIEND
 
     BLE_MESH_FRIEND_SUB_LIST_SIZE:
         description: >
             Size of the Subscription List that can be supported by a
             Friend node for a Low Power node.
         value: 3
-        restrictions: BLE_MESH_FRIEND
 
     BLE_MESH_FRIEND_LPN_COUNT:
         description: >
             Number of Low Power Nodes the Friend can have a Friendship
             with simultaneously.
         value: 2
-        restrictions: BLE_MESH_FRIEND
+
 
     BLE_MESH_FRIEND_SEG_RX:
         description: >
@@ -509,7 +505,7 @@
             many elements we can simultaneously be receiving segmented
             messages from when the messages are going into the Friend queue.
         value: 1
-        restrictions: BLE_MESH_FRIEND
+
 
     BLE_MESH_CFG_CLI:
         description: >