summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * chore(headers): add chassis id tlv definesValery Ivanov2021-05-071-0/+11
| |
| * chore(macros): add set lldp tlv type/length macrosValery Ivanov2021-05-071-0/+3
| |
| * feat(headers): add base LLDP headerValery Ivanov2021-05-071-0/+13
| |
* | Merge pull request #124 from ivalery111/resolve-potential-cpp-new-conflictJoachim Wiberg2021-05-021-8/+8
|\ \ | |/ | | Fix potential name conflict with cpp keyword 'new'
| * Fix potential name conflict with cpp keyword 'new'Valery Ivanov2021-05-021-8/+8
|/
* Merge pull request #122 from ivalery111/fix-unused-parameter-warningJoachim Wiberg2021-05-013-0/+5
|\ | | | | Fix unused parameter warnings
| * Fix unused parameter warningsValery Ivanov2021-04-283-0/+5
| | | | | | | | Signed-off-by: Valery Ivanov <ivalery111@gmail.com>
* | Merge pull request #123 from ivalery111/fix-malloc-checkJoachim Wiberg2021-05-010-0/+0
|\ \ | | | | | | Fix malloc return value checking; Fix potential memory leak
| * | Fix malloc return value checking; Fix potential memory leakValery Ivanov2021-04-281-1/+1
| |/
* | Merge pull request #121 from ivalery111/unused-variableJoachim Wiberg2021-05-010-0/+0
|\ \ | | | | | | Remove unused variable in libnet_pblock.c
| * | Remove unused variable in libnet_pblock.cValery Ivanov2021-04-281-1/+0
| |/ | | | | | | Signed-off-by: Valery Ivanov <ivalery111@gmail.com>
* | Merge pull request #120 from adrianreber/masterJoachim Wiberg2021-04-233-2/+2
|\ \ | |/ |/| Fix a few gcc -fanalyzer warnings
| * libnet_cq.c: fix 'dereference of possibly-NULL'Adrian Reber2021-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libnet_cq.c:139:18: warning: dereference of possibly-NULL ‘new_18’ [CWE-690] [-Wanalyzer-possible-null-dereference] 139 | new->context = l; | ~~~~~~~~~~~~~^~~ ‘libnet_cq_add.part.0’: events 1-6 | | 71 | libnet_cq_add(libnet_t *l, char *label) | | ^~~~~~~~~~~~~ | | | | | (1) entry to ‘libnet_cq_add.part.0’ |...... | 89 | if (label == NULL) | | ~ | | | | | (2) following ‘false’ branch (when ‘label_1(D)’ is non-NULL)... |...... | 97 | if (l_cq == NULL) | | ~~ ~ | | | | | | | (4) following ‘false’ branch... | | (3) ...to here |...... | 124 | if (libnet_cq_dup_check(l, label)) | | ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (6) calling ‘libnet_cq_dup_check’ from ‘libnet_cq_add.part.0’ | | (5) ...to here | +--> ‘libnet_cq_dup_check’: events 7-13 | | 269 | libnet_cq_dup_check(libnet_t *l, char *label) | | ^~~~~~~~~~~~~~~~~~~ | | | | | (7) entry to ‘libnet_cq_dup_check’ |...... | 273 | for (p = l_cq; p; p = p->next) | | ~ ~~~~~~~~~~~ | | | | | | | (13) ...to here | | (8) following ‘true’ branch (when ‘p_6’ is non-NULL)... | 274 | { | 275 | if (p->context == l) | | ~~ ~ | | | | | | | (10) following ‘false’ branch... | | (9) ...to here |...... | 281 | if (strncmp(p->context->label, label, LIBNET_LABEL_SIZE) == 0) | | ~~ ~ | | | | | | | (12) following ‘false’ branch... | | (11) ...to here | <------+ | ‘libnet_cq_add.part.0’: events 14-20 | | 124 | if (libnet_cq_dup_check(l, label)) | | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | || | | |(14) returning to ‘libnet_cq_add.part.0’ from ‘libnet_cq_dup_check’ | | (15) following ‘false’ branch... |...... | 130 | new = (libnet_cq_t *)malloc(sizeof (libnet_cq_t)); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (17) this call could return NULL | | (16) ...to here | 131 | if (l_cq == NULL) | | ~ | | | | | (18) following ‘false’ branch... |...... | 139 | new->context = l; | | ~~~~~~~~~~~~~~~~ | | | | | | | (20) ‘new_18’ could be NULL: unchecked value from (17) | | (19) ...to here | Signed-off-by: Adrian Reber <areber@redhat.com>
| * libnet_pblock.c: fix warning "unused variable ‘c’"Adrian Reber2021-04-141-1/+0
| | | | | | | | Signed-off-by: Adrian Reber <areber@redhat.com>
| * libnet_port_list.c: fix gcc -fanalyzer warningAdrian Reber2021-04-141-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes: libnet_port_list.c:99:8: warning: leak of ‘_8’ [CWE-401] [-Wanalyzer-malloc-leak] 99 | if (!all_lists) | ^ ‘libnet_plist_chain_new’: events 1-3 | | 48 | if (l == NULL) | | ^ | | | | | (1) following ‘false’ branch (when ‘l_70(D)’ is non-NULL)... |...... | 53 | if (token_list == NULL) | | ~~ ~ | | | | | | | (3) following ‘false’ branch (when ‘token_list_71(D)’ is non-NULL)... | | (2) ...to here | ‘libnet_plist_chain_new’: event 4 | |cc1: | (4): ...to here | ‘libnet_plist_chain_new’: events 5-9 | | 83 | *plist = malloc(sizeof (libnet_plist_t)); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (5) allocated here | 84 | | 85 | if (!(*plist)) | | ~ | | | | | (6) assuming ‘*plist_74(D)’ is non-NULL | | (7) following ‘false’ branch... |...... | 93 | tmp = *plist; | | ~~~ | | | | | (8) ...to here |...... | 99 | if (!all_lists) | | ~ | | | | | (9) ‘_8’ leaks here; was allocated at (5) | Signed-off-by: Adrian Reber <areber@redhat.com>
* Merge pull request #116 from stha09/if_addr_segfaultJoachim Wiberg2021-01-011-1/+1
|\ | | | | Fix segmentation fault in libnet_ifaddrlist
| * Fix segmentation fault in libnet_ifaddrlistStephan Hartmann2021-01-011-1/+1
|/ | | | | According to getifaddrs man page, ifa_addr can be NULL. Skip such interfaces to avoid NULL dereference.
* Merge pull request #113 from bmwiedemann/dateJoachim Wiberg2020-09-301-3/+2
|\ | | | | Simplify fixmanpages
| * Simplify fixmanpagesBernhard M. Wiedemann2020-09-301-3/+2
|/ | | | | drop -d param to be more portable and reproducible. ISO 8601 date format is fine, even if it differs from doxygen's
* Merge pull request #112 from bmwiedemann/dateJoachim Wiberg2020-09-301-2/+2
|\ | | | | Make man-page generation reproducible
| * Make man-page generation reproducibleBernhard M. Wiedemann2020-09-301-2/+2
|/ | | | | | | | | | | | | For this we behave similar to pod2man and use the input file mtime. Also adapt date format to what doxygen-1.8.20 produces to make the comment above true again. LC_ALL=C is used so that %B is independent of language. Also use UTC to be independent of timezone. This patch was done while working on reproducible builds for openSUSE.
* Travis-CI: Drop md5sha1sum on macOS, md5sum now part of coreutils in HomebrewJoachim Nilsson2020-07-101-1/+1
| | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
* Merge pull request #94 from libnet/license-cleanupJoachim Nilsson2020-07-1012-418/+220
|\ | | | | Major license change: 4-clause BSD to 3-clause BSD
| * Speculatively fix bpf.h include for snoop and dlpilicense-cleanupJoachim Nilsson2019-10-202-2/+2
| | | | | | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
| * Fix bpf.h include after removal, macOS has this in net/bpf.hJoachim Nilsson2019-10-201-2/+0
| | | | | | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
| * Change from 4-clause to 3-clause BSD license for src/libnet_link_*.cJoachim Nilsson2019-10-209-127/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adopts the 3-clause BSD license for all src/libnet_link_*.c files previously under the 4-clause BSD license. Effectively this drops the "obnoxious" advertising clause which is usually what is under most contention when BSD licenses are discussed. For a background, the https://en.wikipedia.org/wiki/BSD_licenses page provides an interesting read. Briefly, in 1999 Berkeley rescinded the original 3rd clause (see below) leading to a change in major software projects to, not only adopt this new BSD license, but also renumber the listed provisions. Ref. ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
| * libnet_ansn1.c: Align header 2-clause BSD license with libnet_asn1.hJoachim Nilsson2019-10-201-17/+19
| | | | | | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
| * Drop include/bpf.h, 4-clause BSD and unused on major platformsJoachim Nilsson2019-10-202-270/+1
| | | | | | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
* | Merge pull request #102 from ThomasHabets/masterJoachim Nilsson2019-11-021-3/+4
|\ \ | | | | | | Fix possible overflows
| * | Fix possible overflowsThomas Habets2019-11-011-3/+4
|/ /
* | Merge pull request #99 from ThomasHabets/cstyleJoachim Nilsson2019-10-232-1/+2
|\ \ | | | | | | Fix C89 syntax error, and document C89 being the style
| * | Fix C89 syntax error, and document C89 being the styleThomas Habets2019-10-222-1/+2
| |/
* | Merge pull request #98 from ThomasHabets/signedJoachim Nilsson2019-10-2335-222/+143
|\ \ | | | | | | Clean up some signed/unsigned comparisons
| * | Clean up some signed/unsigned comparisonsThomas Habets2019-10-2235-222/+143
| |/
* | Merge pull request #96 from ThomasHabets/pointwarnJoachim Nilsson2019-10-231-5/+5
|\ \ | | | | | | Cast pointer to (void*) to silence -Wextra warning
| * | Cast pointer to (void*) to silence -Wextra warningThomas Habets2019-10-211-5/+5
| |/
* | Merge pull request #97 from ThomasHabets/typesJoachim Nilsson2019-10-235-6/+17
|\ \ | |/ |/| Fix some non-standard types to build with -std=c18
| * Fix some non-standard types to build with -std=c18Thomas Habets2019-10-215-6/+17
|/
* Update local 4-clause BSD getopt.c with FreeBSD 3-clause versionJoachim Nilsson2019-10-202-182/+190
| | | | | | | | | | | | | | | | | | | This patch updates the local getopt.c, used only when building samples on Windows, with a newer version with better license from FreeBSD. For reference, Berkeley recinded the 3rd clause of the original 4-clause license in 1999. This was adopted by the BSD UNIX community, and later the numbering was also updated. https://bsd.slashdot.org/story/99/09/02/189210/berkeley-removes-advertising-clause For some reason, the replacement header file, win32/getopt.h, comes with the 2-clause BSD license. I did no more research on that, but I guess the FreeBSD VCS has the complete story. Related to issue #85. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
* Remove pre-built binary files from win32/wpdpackJoachim Nilsson2019-10-2028-3278/+12
| | | | | | | | | | | | | Not only is it our policy to not include binaries in GIT, the wpdpack distribution comes under another license, see #85, which means libnet top LICENSE file would otherwise have to be changed. We recommend installing https://nmap.org/npcap/ for using libnet on Windows. For cross-building on a non-windows host, see README.win32. Closes #93 Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
* Cleanup and style, me vs us, formatting etc.Joachim Nilsson2019-10-191-64/+74
| | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
* Adjust path to WINPACP filesJoachim Nilsson2019-10-191-3/+3
| | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
* Simplify/Shorten TitleJoachim Nilsson2019-10-191-2/+2
| | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
* Trial run with logoJoachim Nilsson2019-10-192-1/+1
| | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
* Minor, whitespaceJoachim Nilsson2019-10-191-2/+2
| | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
* Use standard int64_t instead of __int64_t for mingw cross buildJoachim Nilsson2019-10-191-3/+3
| | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
* Must include Packet32.h first to get struct bpf_program for pcap.hJoachim Nilsson2019-10-191-4/+5
| | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
* Remove generated file from GITJoachim Nilsson2019-10-191-176/+0
| | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
* Travis-CI: Don't run release targetJoachim Nilsson2019-10-191-1/+1
| | | | | Don't run release target in automated build since it checks for tags and waits for human input. Instead we do the distcheck and doc targets, which are the most important ones to check anyway.
* Bump version for v1.3 release cycleJoachim Nilsson2019-10-191-1/+1
| | | | Signed-off-by: Joachim Nilsson <troglobit@gmail.com>