nDPI/example
Ludovico Cavedon 35dc6e27ae 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.
2018-01-09 10:26:10 -08:00
..
Win32 Update pcapExample.vcxproj.filters 2015-05-15 02:52:28 +02:00
Makefile.am Undoes 2155dd9 that breaks ntopng Travis 2017-10-23 15:20:30 +02:00
ndpi_util.c Fix MPLS header parsing in ndpiReader. 2018-01-09 10:26:10 -08:00
ndpi_util.h Refactoring the debugging output. 2017-10-26 20:41:22 +03:00
ndpiReader.c Merge branch 'dev' into dev 2017-12-07 22:45:28 +01:00
protos.txt spelling: googlesyndication 2017-03-12 21:37:41 +00:00
uthash.h Added port stats when verbose mode (-v) is used 2017-04-19 23:31:45 +02:00