Changeset 5732e9b


Ignore:
Timestamp:
11/01/17 13:26:08 (3 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, dpdk-ndag, etsilive, master, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
Children:
9d00fb13
Parents:
9cdbedb
Message:

Fix bad IPv6 fragment offset calculation.

This has been horribly broken the whole time, but we generally got
lucky and fell through to the default "no fragmentation" case.
Since nobody uses IPv6 fragmentation, this seemed to be giving the
correct result.

Of course, on the odd occasion we'd accidentally treat a packet as
a fragment incorrectly and therefore trace_get_source_port() etc
would fail -- this was a bit more problematic :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/protocols_l3.c

    ree6e802 r5732e9b  
    752752        if (ethertype == TRACE_ETHERTYPE_IPV6) {
    753753                libtrace_ip6_t *ip6 = (libtrace_ip6_t *)l3;
    754                 void *payload = ip6++;
     754                void *payload = ip6 + 1;
    755755                uint8_t nxt = ip6->nxt;
    756756                uint16_t len;
Note: See TracChangeset for help on using the changeset viewer.