diff options
author | Alexander Chernavin <achernavin@netgate.com> | 2023-11-14 11:33:46 +0000 |
---|---|---|
committer | Matthew Smith <mgsmith@netgate.com> | 2023-11-14 22:06:53 +0000 |
commit | bae6b6d1f2a2e6623257afab21e05da2d795323a (patch) | |
tree | c1a5c6d0c0c4432734f61cc9b8bea92accaefedb /extras/strongswan | |
parent | dd8f8dec50a4b572a09e3168a92c2a09db42b9f3 (diff) |
flowprobe: fix L3 header offset calculation for tx flows
The recent TX flows generation fix introduced "l3_hdr_offset" which
represents the offset of the IP header in the buffer's data. The problem
is that it is erroneously defined as a 16-bit unsigned integer. If the
calculated offset is negative, "l3_hdr_offset" will get a value close to
UINT16_MAX. And the code will search the IP header somewhere beyond the
buffer's data. For example, this will occur in the case when an ICMP
error is being sent in response to a received packet.
With this fix, make "l3_hdr_offset" a signed integer.
Type: fix
Change-Id: I6f1283c7ba02656d0f592519b5863e68348c5583
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Diffstat (limited to 'extras/strongswan')
0 files changed, 0 insertions, 0 deletions