mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 18:13:49 +01:00
gnrc_ipv6: drop packets with unspecified destination
It just doesn't makes sense to handle them any further
This commit is contained in:
parent
0aa96a4579
commit
0bdbb68959
@ -665,6 +665,12 @@ static void _send(gnrc_pktsnip_t *pkt, bool prep_hdr)
|
|||||||
gnrc_pktbuf_release_error(pkt, EINVAL);
|
gnrc_pktbuf_release_error(pkt, EINVAL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (ipv6_addr_is_unspecified(&((ipv6_hdr_t *)pkt->data)->dst)) {
|
||||||
|
DEBUG("ipv6: destination address is unspecified address (::), "
|
||||||
|
"dropping packet \n");
|
||||||
|
gnrc_pktbuf_release_error(pkt, EINVAL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
tmp_pkt = gnrc_pktbuf_start_write(pkt);
|
tmp_pkt = gnrc_pktbuf_start_write(pkt);
|
||||||
if (tmp_pkt == NULL) {
|
if (tmp_pkt == NULL) {
|
||||||
DEBUG("ipv6: unable to get write access to IPv6 header, dropping packet\n");
|
DEBUG("ipv6: unable to get write access to IPv6 header, dropping packet\n");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user