<p><b>@maribu</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/10638#discussion_r246455466">drivers/cc1xxx_common/gnrc_netif_cc1xxx.c</a>:</p>
<pre style='color:#555'>> +    /* get the payload size and the dst address details */
+    size = gnrc_pkt_len(pkt->next);
+    DEBUG("[cc1xxx-gnrc] send: payload of packet is %i\n", (int)size);
+    netif_hdr = (gnrc_netif_hdr_t *)pkt->data;
+
+
+    l2hdr.src_addr = cc1xxx_dev->addr;
+    if (netif_hdr->flags & BCAST) {
+        l2hdr.dest_addr = 0x00;
+        DEBUG("[cc1xxx-gnrc] send: preparing to send broadcast\n");
+    }
+    else {
+        /* check that destination address is valid */
+        assert(netif_hdr->dst_l2addr_len > 0);
+        uint8_t *addr = gnrc_netif_hdr_get_dst_addr(netif_hdr);
+        l2hdr.dest_addr = addr[netif_hdr->dst_l2addr_len - 1];
</pre>
<p>Cargo cult programming I guess:</p>
<p><a href="https://github.com/RIOT-OS/RIOT/blob/d99d72c583789bba3d8696274358af2d52d19ac9/drivers/cc110x/gnrc_cc110x/gnrc_cc110x.c#L60-L61">https://github.com/RIOT-OS/RIOT/blob/d99d72c583789bba3d8696274358af2d52d19ac9/drivers/cc110x/gnrc_cc110x/gnrc_cc110x.c#L60-L61</a></p>
<p>Btw: Would it not be better to even use</p>
<pre><code>assert(netif_hdr->dst_l2addr_len == 0);
uint8_t *addr = gnrc_netif_hdr_get_dst_addr(netif_hdr);
l2hdr.dest_addr = addr[0];
</code></pre>
<p>(Note the change assert.) For CC1xxx devices Layer 2 addresses will always be 1 byte long</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/10638#discussion_r246455466">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AEn7YPpjHw1Kj9t6vJq6sf3t5ITQhVAfks5vBiH6gaJpZM4ZZ_Ga">mute the thread</a>.<img src="https://github.com/notifications/beacon/AEn7YCjgu5JObAxuKthy-m3NCugvkctIks5vBiH6gaJpZM4ZZ_Ga.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/RIOT-OS/RIOT","title":"RIOT-OS/RIOT","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/RIOT-OS/RIOT"}},"updates":{"snippets":[{"icon":"PERSON","message":"@maribu commented on #10638"}],"action":{"name":"View Pull Request","url":"https://github.com/RIOT-OS/RIOT/pull/10638#discussion_r246455466"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/10638#discussion_r246455466",
"url": "https://github.com/RIOT-OS/RIOT/pull/10638#discussion_r246455466",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>