Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnrc_ipv6_ext: don't read from pkt->data after _demux() #11580

Merged
merged 1 commit into from May 25, 2019

Commits on May 24, 2019

  1. 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.
    miri64 committed May 24, 2019
    Configuration menu
    Copy the full SHA
    ea1708b View commit details
    Browse the repository at this point in the history