You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2022/08/23 11:39:25 UTC

[GitHub] [mynewt-nimble] andrzej-kaczmarek opened a new pull request, #1333: nimble/ll: Check advertising data length

andrzej-kaczmarek opened a new pull request, #1333:
URL: https://github.com/apache/mynewt-nimble/pull/1333

   This adds check for advertising/scan response data length when adding
   data to advertising instance or changing instance parameters.
   
   This fixes HCI/DDI/BI-62-C.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #1333: nimble/ll: Check advertising data length

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on PR #1333:
URL: https://github.com/apache/mynewt-nimble/pull/1333#issuecomment-1224372718

   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### nimble/controller/src/ble_ll_adv.c
   <details>
   
   ```diff
   @@ -1401,7 +1400,7 @@
         * TargetA is included in AUX_ADV_IND which is in that case calculated in
         * ble_ll_adv_aux_schedule_first().
         */
   -    if (first_pdu  &&
   +    if (first_pdu &&
            (props & BLE_HCI_LE_SET_EXT_ADV_PROP_DIRECTED) &&
            !(props & BLE_HCI_LE_SET_EXT_ADV_PROP_SCANNABLE)) {
            ext_hdr_flags |= (1 << BLE_LL_EXT_ADV_TARGETA_BIT);
   @@ -2336,20 +2335,20 @@
    
        /* AuxPtr if there are more AdvData remaining that we can fit here */
        if ((rem_data_len > sync->data_len)) {
   -            /* adjust for flags that needs to be added if AuxPtr is only field
   -             * in Extended Header
   -             */
   -            if (!sync->ext_hdr_flags) {
   -                ext_hdr_len += BLE_LL_EXT_ADV_FLAGS_SIZE;
   -                sync->data_len -= BLE_LL_EXT_ADV_FLAGS_SIZE;
   -            }
   -
   -            sync->ext_hdr_flags |= (1 << BLE_LL_EXT_ADV_AUX_PTR_BIT);
   +        /* adjust for flags that needs to be added if AuxPtr is only field
   +         * in Extended Header
   +         */
   +        if (!sync->ext_hdr_flags) {
   +            ext_hdr_len += BLE_LL_EXT_ADV_FLAGS_SIZE;
   +            sync->data_len -= BLE_LL_EXT_ADV_FLAGS_SIZE;
   +        }
   +
   +        sync->ext_hdr_flags |= (1 << BLE_LL_EXT_ADV_AUX_PTR_BIT);
            ext_hdr_len += BLE_LL_EXT_ADV_AUX_PTR_SIZE;
   -            sync->data_len -= BLE_LL_EXT_ADV_AUX_PTR_SIZE;
   -
   -            /* PDU payload should be full if chained */
   -            BLE_LL_ASSERT(ext_hdr_len + sync->data_len == BLE_LL_MAX_PAYLOAD_LEN);
   +        sync->data_len -= BLE_LL_EXT_ADV_AUX_PTR_SIZE;
   +
   +        /* PDU payload should be full if chained */
   +        BLE_LL_ASSERT(ext_hdr_len + sync->data_len == BLE_LL_MAX_PAYLOAD_LEN);
        }
    
        sync->payload_len = ext_hdr_len + sync->data_len;
   ```
   
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #1333: nimble/ll: Check advertising data length

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on PR #1333:
URL: https://github.com/apache/mynewt-nimble/pull/1333#issuecomment-1231541412

   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-nimble] andrzej-kaczmarek merged pull request #1333: nimble/ll: Check advertising data length

Posted by GitBox <gi...@apache.org>.
andrzej-kaczmarek merged PR #1333:
URL: https://github.com/apache/mynewt-nimble/pull/1333


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org