Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: uno20001 <regisztralo111@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: uno20001 <regisztralo111@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
The bugs@netsniff-ng.org e-mail bounces. Also it's more convenient to
report bugs using GitHub rather than via e-mail, so consistently mention
https://github.com/netsniff-ng/netsniff-ng/issues for where to report
bugs.
Fixes #226
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Move variable definitions to avoid "multiple definition of symbol"
linker errors with gcc-10.
Fixes #216
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Move variable definitions to avoid "multiple definition of symbol"
linker errors with gcc-10.
Updates #216
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Move variable definitions to avoid "multiple definition of symbol"
linker errors with gcc-10.
Updates #216
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Move variable definitions to avoid "multiple definition of symbol"
linker errors with gcc-10.
Updates #216
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Move variables only used withing a single compilation unit from mz.h and
make them static. This avoids "multiple definition of symbol" linker
errors with gcc-10.
Updates #216
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Needed for ssize_t under uClibc-ng.
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Added an integer arithmetic check prior to performing arithmetic to
prevent accidental out of bounds memory access.
Signed-off-by: Nathaniel Ferguson <nathaniel@leapfrog.foundation>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Fixed a typo wherein a pointer was incremented by sizeof(uint32_t) after
reading sizeof(uint16_t) and before reading another sizeof(uint16_t). In
essence a potential out of bounds memory access (read) due to improper
increment of pointer
Signed-off-by: Nathaniel Ferguson <nathaniel@leapfrog.foundation>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Make netsniff error out of a recv routine if calls to inet_ntop() fail
by adding return value checks. There are other inet_ntop() usages of
similar however these are in a receive code path with user data for most
of the variables
Signed-off-by: Nathaniel Ferguson <nathaniel@leapfrog.foundation>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Entails the potential integer underflow of a signed integer.
Signed-off-by: Nathaniel Ferguson <nathaniel@leapfrog.foundation>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Prevent crashes when using mausezahn in interactive mode by using calloc
to zero the memory upon allocation.
Fixes #195
Signed-off-by: Michael R Torres <mic.ric.tor@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Corrects the accidental assignment of _c_ to 'c' or 'p' due to a missing equals sign. This enables the proper display of the missing argument error message for all relevant options.
Signed-off-by: Michael R Torres <mic.ric.tor@gmail.com>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Linux netdev can contain uppercase characters.
Signed-off-by: Benoît Ganne <benoit.ganne@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Add a command line option -R to specify SO_PRIORITY socket option. This
then sets priority of the generated SKBs, which is handy for testing Qdiscs
and other priority-dependent functionality.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
This option is mentioned further in the man page, but is omitted in the
main section. Add it.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Group functions for the same protocol together.
Signed-off-by: uno20001 <regisztralo111@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
When testing trafgen with the following example from the man page the
error message "Failed to parse MAC address 11:22:33:44:55:66" is
printed.
trafgen -o lo --cpus 1 -n 3 '{ eth(da=11:22:33:44:55:66, da[0]=dinc()), tcp() }'
Turns out errno was not cleared before str2mac() called sscanf().
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Jon's name was spelled wrong in .mailmap in commit 79608cdc169b
("AUTHORS: auto-generate from commit log") and thus ended up being wrong
in the AUTHORS file since we started auto-generating it. Sorry about
that!
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Currently, using -t 0 option calls shaper_set_delay with 0 sec and 0 ns,
which results in sh->type to be SHAPER_NONE. This in turn causes trafgen
to use TX_RING.
Expected behavior, from "man trafgen":
If this option is given, then instead of packet(7)'s TX_RING
interface, trafgen will use sendto(2) I/O for network packets, even
if the argument is 0.
This patch forces sh->type to be set to SHAPER_DELAY even if
the delay is 0. shaper_delay already handles the case where
sh->type is SHAPER_DELAY and the delay is 0.
Fixes #208
Signed-off-by: Quentin Chateau <quentin.chateau@gmail.com>
[tklauser: adjusted commit message to include change description]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Older versions of gzip assume the GZIP environment variable contains
flags[1]. Building netsniff-ng on a system with such a version of gzip
will yield the following error:
INST netsniff-ng/netsniff-ng
gzip -9 -c netsniff-ng.8 > netsniff-ng/netsniff-ng.8.gz
gzip: gzip: No such file or directory
A practical alternative to redefining GZIP in the Makefile seems to be
to use the GZIP_ENV make variable[2] instead.
[1] The GZIP environment variable was deprecated in gzip version 1.7.
See https://www.gnu.org/software/gzip/manual/html_node/Environment.html
and https://git.savannah.gnu.org/cgit/gzip.git/tree/NEWS for more
information.
[2] https://www.gnu.org/software/automake/manual/automake.html#index-GZIP_005fENV
Signed-off-by: Daniel Roggow <daniel.roggow@rockwellcollins.com>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Calculate ICMP and TCP checksums for both IPv4 and IPv6,
Fixes #198
Fixes #200
Signed-off-by: uno20001 <regisztralo111@gmail.com>
[tk: code formatting, C89 compatibility]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
I tend to forget to update the AUTHORS file with new contributors. Let's
automate it and extract the contributors from the commit log.
Manually mention people how have contributed in other ways (bug reports,
documentation etc.) or how had commits in the previousl, no longer
existing repository.
Script based on
https://github.com/cilium/cilium/blob/master/contrib/scripts/extract_authors.sh
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
As a preparation for auto-generating the AUTHORS file, move everybody to
a single list of contributors.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Kartik Mistry <kartik.mistry@gmail.com>
|
|
If we want to use https://netsniff-ng.github.io instead of
https://netsniff-ng.github.io/netsniff-ng the source apparently have to
live in a separate repository.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Let's move to GitHub pages so I don't always forget to update the
website upon a new release.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Store the default "dump-" prefix in ctx->prefix instead of checking it
every time in generate_multi_pcap_filename.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Add Whang Choi for PR #202
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Add a new option -O, --overwrite which allows to rotate capture files.
The timestamp in the file name is replaced with a number that wraps
around after reaching the specified number of files.
Example usage:
netsniff-ng -s -F 1KiB -O 10 -i eth0 -o /output/folder
Fixes #147
Signed-off-by: Whang Choi <wch0x01@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|