diff options
author | Ludovico Cavedon <ludovico.cavedon@gmail.com> | 2018-01-09 10:26:10 -0800 |
---|---|---|
committer | Ludovico Cavedon <ludovico.cavedon@gmail.com> | 2018-01-09 10:26:10 -0800 |
commit | 35dc6e27ae11a92553611a9d3d8c1ed963a894d4 (patch) | |
tree | 619e67fc56ea614d1121767992488711a6bf1cbf /src/lib/protocols/apple_push.c | |
parent | 61e297b851af570109e72a93a65b1ac5ccfda0b4 (diff) |
Fix MPLS header parsing in ndpiReader.
Reported at https://bugs.debian.org/886133.
The current parsing for the MPLS header in examples/ndpi_util.c has
multiple issues:
- the bitfield order is incorrect for little endian architectures
- ntohl() is applied to a 20 bit label, which has unclear purpose
- if multiple labels are detected, the while loop parsing labels will
never exit due to a missing re-read of the mpls label
- the last label is identified by looking inside the label field, while
it should be done by looking at the S bit
This change fixes the above issues.
Notice that bitfield ordering is implementation-dependent, so C
bitfields should not be used in the first place to parse network
packets.
Diffstat (limited to 'src/lib/protocols/apple_push.c')
0 files changed, 0 insertions, 0 deletions