1. The test server can be induced to reply with concatenated packets by
sending it fragmented Legacy IP datagrams. For example, with a tunnel
MTU of 1400 bytes, send fragmented pings:
`ping -s $((MTU - 28 + 1)) -c1 -M dont $IP`.
Resulting trace-level log messages:
```
Sending IF-T/TLS data packet of 1396 bytes
Sending IPv4 data packet of 1396 bytes
Sending IF-T/TLS data packet of 25 bytes
Sending IPv4 data packet of 25 bytes
No work to do; sleeping for 2147483647 ms...
Received packet of 1412 bytes with 41 trailing bytes of concatenated packet.
Received IPv4 data packet of 1396 bytes
Received IPv4 data packet of 25 bytes
```
2. Test server can be induced to reply with split packets by sending it
fragmented Legacy IP datagrams such that the concatenated replies won't
fit in a single TLS frame (16384 bytes). For example:
`ping -s 16385 -c1 -M dont $IP`
Resulting trace-level log messages (omitting the outgoing bits for brevity):
```
Received packet of 1412 bytes with 14972 trailing bytes of concatenated packet.
Received IPv4 data packet of 1396 bytes
Received packet of 1412 bytes with 13560 trailing bytes of concatenated packet.
Received IPv4 data packet of 1396 bytes
Received packet of 1412 bytes with 12148 trailing bytes of concatenated packet.
Received IPv4 data packet of 1396 bytes
Received packet of 1412 bytes with 10736 trailing bytes of concatenated packet.
Received IPv4 data packet of 1396 bytes
Received packet of 1412 bytes with 9324 trailing bytes of concatenated packet.
Received IPv4 data packet of 1396 bytes
Received packet of 1412 bytes with 7912 trailing bytes of concatenated packet.
Received IPv4 data packet of 1396 bytes
Received packet of 1412 bytes with 6500 trailing bytes of concatenated packet.
Received IPv4 data packet of 1396 bytes
Received packet of 1412 bytes with 5088 trailing bytes of concatenated packet.
Received IPv4 data packet of 1396 bytes
Received packet of 1412 bytes with 3676 trailing bytes of concatenated packet.
Received IPv4 data packet of 1396 bytes
Received packet of 1412 bytes with 2264 trailing bytes of concatenated packet.
Received IPv4 data packet of 1396 bytes
Received packet of 1412 bytes with 852 trailing bytes of concatenated packet.
Received IPv4 data packet of 1396 bytes
Received partial packet, 852 of 1293 bytes
Received IPv4 data packet of 1277 bytes
```
Signed-off-by: Daniel Lenski <email address hidden>
Improve packet logging over Pulse IFT-T/TLS tunnel
1. Don't dump full "normal"/expected packet contents as hex, unless
'--dump-http-traffic' is specified.
2. Report IP version of packets sent/received.
3. Use 'hdr_size' instead of literal '16'; found one case where
it was incorrectly coded as '8', probably due to copy-pasting
from CSTP.
Signed-off-by: Daniel Lenski <email address hidden>
009eb36...
by
Dimitri Papadopoulos Orfanos <email address hidden>
Include <libxml/tree.h> from a single place
<libxml/tree.h> used to be included both by "openconnect-internal.h"
and from *.c source files. We don't need both. Let's settle on including
from "openconnect-internal.h" only.