1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/net/gnrc
Martine Lenders ea1708b402 gnrc_ipv6_ext: don't read from pkt->data after _demux()
`_demux()` might change `pkt->data` in all kind of ways (moving it due
to `gnrc_pktbuf_mark()`, though unlikely; releasing it, because e.g. it
starts with a fragment header that marks a fragmented packet containing
only one fragment, etc.) so accessing the pointer *after* calling
`_demux()` is somewhat playing with fire. This change avoids this by
storing the value of `ext_hdr->nh` (all we are interested in here) in a
temporary variable that then is used to set the out-parameter `nh`.

`protnum` needs to be unchanged before the call to `_demux()` as it was
set by the previous iteration and determines what extension header
actually is handled.
2019-05-24 22:11:22 +02:00
..
application_layer sys/net: NETOPT_MAX_{PACKET_SIZE -> PDU_SIZE} 2019-02-18 20:15:08 +01:00
link_layer gnrc_mac: rename directory in line with other modules 2019-05-09 14:46:35 +02:00
netapi gnrc_netapi: use static inline for high-level wrapper functions 2018-12-11 16:15:51 +01:00
netif gnrc_netif_ieee802154: check if mhr_len is lesser than nread 2019-04-15 16:36:31 +02:00
netreg gnrc_netreg: use thread_has_msg_queue() for msg queue check 2018-12-19 15:39:50 +01:00
nettest gnrc: remove legacy network interface structures 2017-11-17 09:20:29 +01:00
network_layer gnrc_ipv6_ext: don't read from pkt->data after _demux() 2019-05-24 22:11:22 +02:00
pkt gnrc: cleanup and corrections in gnrc_pkt 2017-04-22 20:56:54 +02:00
pktbuf net/gnrc_pktbuf: rm deprecated _pktbuf_get_iovec() 2019-03-15 10:21:22 +01:00
pktbuf_malloc gnrc_pktbuf_malloc: allow write-protect of size 0 snips 2019-03-12 14:35:58 +01:00
pktbuf_static gnrc_pktbuf_static: allow write-protect of size 0 snips 2019-03-12 14:34:49 +01:00
pktdump gnrc_pktdump: add GNRC_NETTYPE_IPV6_EXT output 2018-12-14 01:37:53 +01:00
priority_pktqueue gnrc_priority_queue: updated coding style. 2017-06-22 11:36:55 +02:00
routing/rpl gnrc_rpl_auto_init: add workaround comments 2019-02-26 20:33:07 +01:00
sock gnrc_sock_[udp|ip]: store return value before release 2018-11-12 14:58:26 +01:00
transport_layer gnrc_tcp: Fix packet-flood while probing 2019-03-26 21:05:53 +01:00
Makefile gnrc_mac: rename directory in line with other modules 2019-05-09 14:46:35 +02:00