1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00
Commit Graph

1265 Commits

Author SHA1 Message Date
visuve
468159e6d2 Close socket when setsockopt fails
- Prevent resource leak
2021-03-04 23:55:29 +02:00
Matias Fontanini
cd40b232e7 Merge pull request #427 from nhutchinson-te/bsd-routing-table
Fix infinite loop when querying BSD routing table
2021-01-04 18:44:06 -08:00
Nick Hutchinson
1166094a2f Fix infinite loop when querying BSD routing table
Fix `query_route_table()` returning a buffer padded with extra '\0'
bytes because it ignored the buffer size returned by `sysctl()`.

This caused `route_entries()` / `route6_entries()` to fall into an
infinite loop, forever trying to parse a 0-length routing entry.
2021-01-04 12:02:03 +00:00
Matias Fontanini
b3d874d6a8 Merge pull request #426 from theDogOfPavlov/master
Added RFC8335 Extended echo types to headers
2020-12-29 08:52:34 -08:00
Martin O'Neal
553b1fb255 Added RFC8335 Extended Echo types 2020-12-29 08:36:30 +00:00
Martin O'Neal
94939dd0fa Added RFC8355 ICMP Extended Echo support
Added RFC8355 ICMP Extended Echo request/reply to Flags (no other changes made)
2020-12-29 08:32:29 +00:00
Matias Fontanini
0774a8dcad Bump version to 4.4 in CMakeLists.txt 2020-09-17 22:20:32 -07:00
Matias Fontanini
f46dee9f19 Add changelog for version 4.3 v4.3 2020-09-17 22:20:10 -07:00
Matias Fontanini
5b082a82b2 Merge pull request #420 from mfontanini/control-ta-fix
Assign a PDUType for Dot11ControlTA
2020-09-10 08:44:05 -07:00
Matias Fontanini
07012648fb Assign a PDUType for Dot11ControlTA 2020-09-10 07:34:54 -07:00
Matias Fontanini
ce409dbc7e Merge pull request #374 from almikhayl/373-esp
Fix malformed packet exception on esp header
2020-02-01 11:04:00 -08:00
Matias Fontanini
16e77146ab Merge pull request #382 from laudrup/fix-install-without-libpcap
Don't include non-existing headers when installed without libpcap
2020-02-01 11:01:16 -08:00
Matias Fontanini
a87c4a64f5 Merge pull request #383 from laudrup/silence-msvc2017-warnings
Fix compiler warnings from MSVC 2017
2020-02-01 10:59:38 -08:00
Kasper Laudrup
9e61286a59 Fix compiler warnings from MSVC 2017
The MS C++ compiler doesn't seem to understand that a small constant
like 0, although strictly being an integer, will fit perfectly fine
into an 8 bit type so add some safe casts to silence that warning.
2019-12-20 14:37:38 +01:00
Kasper Laudrup
8da102fb48 Don't include non-existing headers when installed without libpcap
If libpcap support has been disabled (LIBTINS_ENABLE_PCAP=OFF)
then the headers requiring that library will not be installed,
but they will still be included from the main tins.h convenience
header.

This fixes that by sorrounding the includes with an #ifdef the
same way it has been done for DOT11 support.
2019-12-20 14:18:07 +01:00
Aleksey Mikhaylov
750c3556d9 Fix malformed packet exception on esp header 2019-10-19 19:56:20 +03:00
Matias Fontanini
28663b0e93 Merge pull request #369 from avast/ipv6-local-unicast
add IPv6 check for Link-Local unicast address
2019-10-02 08:33:25 -07:00
Matias Fontanini
731e36e373 Fix "fi" in comment 2019-10-02 08:32:54 -07:00
Karas Lukáš
608b48f25c add IPv6 check for Link-Local unicast address 2019-10-01 17:08:01 +02:00
Matias Fontanini
de247fcbc8 Merge pull request #346 from pallas/avoid-unused-variable-warning
radiotap: avoid unused variable warning
2019-04-25 18:17:48 -07:00
Derrick Lyndon Pallas
7bc4d38470 radiotap: remove unused variable 2019-04-24 02:32:09 +00:00
Matias Fontanini
a926b75224 Merge pull request #343 from pallas/fix-several-leaks
Fix several leaks
2019-04-12 07:35:01 -07:00
Derrick Lyndon Pallas
064439236c OfflinePacketFilter: avoid leak during copy-construction or assignment 2019-04-11 18:20:53 +00:00
Derrick Lyndon Pallas
0c40a0714b PacketWriter: avoid use-after-free on error in init 2019-04-11 18:20:53 +00:00
Derrick Lyndon Pallas
d74520768b OfflinePacketFilter: avoid leaks on error in init 2019-04-11 18:20:53 +00:00
Matias Fontanini
3385df9cc9 Merge pull request #342 from pallas/avoid-gcc-warning
tests/dhcp: avoid warning: type qualifiers ignored on cast result type
2019-04-10 19:45:03 -07:00
Derrick Lyndon Pallas
18c31b20f5 tests/dhcp: avoid warning: type qualifiers ignored on cast result type 2019-04-10 23:14:48 +00:00
Matias Fontanini
7387912ca1 Merge pull request #341 from m-peko/master
Fix possible memory leak in active tests
2019-04-08 09:49:52 -07:00
Marin Peko
0d52763a61 Fix possible memory leak in active tests 2019-04-08 15:57:51 +02:00
Matias Fontanini
86b505f998 Merge pull request #335 from avast/stream-syn
Fix detection of a new TCP flow
2019-03-20 10:55:44 -07:00
Martin Beran
62a803c55c fix detection of a new TCP stream 2019-03-18 13:44:51 +01:00
Matias Fontanini
0573808aeb Merge pull request #333 from DDoSolitary/patch-radiotap-writer
Overhaul RadioTapWriter
2019-03-14 18:36:31 -07:00
Lukáš Karas
22b4435c81 simplify tcp flag checks, fix stream_follower (#334)
* simplify tcp flag checks, fix stream_follower

On various places was used simple comparison for checking state of flags.

tcp.flags() == (TCP::SYN | TCP::ACK)

This is not what you want usually, because this check is false
in case that another flag is set also. Correct check for syn-ack
packet should be:

(tcp.flags() & (TCP::SYN | TCP::ACK)) == (TCP::SYN | TCP::ACK)

To simplify this kind of check, add new has_flags method:

bool TCP::has_flags(small_uint<12> check_flags) const

* remove duplicate TCP::SYN flag check
2019-03-14 18:18:12 -07:00
DDoSolitary
b803959e11 Add tests for 2f16497bf8 and 78aa7d1787. 2019-03-12 14:18:59 +08:00
DDoSolitary
2f16497bf8 Fix alignment padding calculation. 2019-03-10 11:48:56 +08:00
DDoSolitary
78aa7d1787 Correct option upper bound testing. 2019-03-10 11:46:38 +08:00
DDoSolitary
ba2216e6e9 Avoid float precision problems of logarithm. 2019-03-10 11:45:36 +08:00
Matias Fontanini
74e3d909e6 Bump library version in CMake file to 4.3 2019-03-07 20:18:04 -08:00
Matias Fontanini
5e52091ecf Use version 4.2 in CMake v4.2 2019-03-07 20:16:02 -08:00
Matias Fontanini
dafb299ea3 Update changelog for version 4.2 2019-03-07 20:15:34 -08:00
Matias Fontanini
659bec56d7 Merge pull request #331 from Kaisrlik/cmake_config_file_location
cmake: update location of cmake configuration files for unix subsystems
2019-02-20 18:29:14 -08:00
Jan Kaisrlik
8c1bea6f84 cmake: update location of cmake configuration files for unix subsystems 2019-02-20 12:22:49 +01:00
Matias Fontanini
d8d1dc003b Merge pull request #330 from danvratil/fix-crosscompilation-check
Fix check whether we are crosscompiling
2019-02-07 09:01:47 -08:00
Daniel Vrátil
c2bb52b82f Fix check whether we are crosscompiling
CMake defines CMAKE_CROSSCOMPILING when crosscompiling so
use that instead of the undefined CROSS_COMPILING variable.
2019-02-07 13:20:39 +01:00
Matias Fontanini
1f5456b18b Merge pull request #324 from pepper-jk/fix_frame_length
Fix frame length
2019-01-27 09:20:58 -08:00
Jens Keim
dc702f4fd6 use advertised_size to determine frame length 2019-01-22 19:33:08 +01:00
Jens Keim
2a8101eef3 add advertised_size method 2019-01-22 19:32:51 +01:00
Matias Fontanini
20702ddaff Merge pull request #326 from solvingj/fix_install_dll_copy_win
add runtime destination to install, and provide default
2019-01-22 09:33:40 -08:00
Jerry W
f4e2701705 add runtime destination to install, and provide default consistent with existing lib default 2019-01-19 12:25:57 -05:00
Matias Fontanini
776ae4e83b Merge pull request #305 from christophert/master
Add comprehensive list of 802.11 Element IDs
2019-01-07 18:53:41 -08:00