Age | Commit message (Collapse) | Author | Files | Lines |
|
Fixes depracation issues for glibc>=2.20 if we define _BSD_SOURCE we
must also define _DEFAULT_SOURCE as well
from tprintf.c
warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
from astraceroute.c
warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
Signed-off-by: Arch3y <arch3y@archstrike.org>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
The sd_len member of struct ctx stores a copy of struct addrinfo member
ai_addrlen which is of type socklen_t. Also it is used in a sendto()
call which also expects a socklen_t. Adjust sd_len to be socklen_t too.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Replace bugs@netsniff-ng.com with netsniff-ng@googlegroups.com
which is used in REPORTING-BUGS file.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
No need for some of the empty lines, remove them to make the output a
bit denser.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Move the copyright/bug report/license string to an own constant and use
it for the output of help() and version() to avoid duplication and
prevent the strings from getting out of sync. This makes the text
section of astraceroute.o slightly smaller:
before:
text data bss dec hex filename
18481 0 4 18485 4835 astraceroute/astraceroute.o
after:
text data bss dec hex filename
18201 0 4 18205 471d astraceroute/astraceroute.o
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
The ioops module is only needed in geoip.o, thus make it dependent on
CONFIG_GEOIP.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Add a wrapper for calloc which checks for integer overflows in the
calculation of the size to allocate.
Use xcalloc to allocate an array of objects instead of calculating the
size ourselves, which might cause an integer overflow.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Change the interface to the geoip_* functions to take a pointer to a
struct sockaddr_in{,6} instead of the struct itself.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Instead of having to perform the individual steps to initialize a ring
and open coding them in multiple places, provide convenience functions
to do all at once. This has the nice side effect of allowing to make
most of these *_{rx,tx}_ring() functions static in their respective
module.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Fixed typo in astraceroute.* files.
Signed-off-by: Kartik Mistry <kartik.mistry@gmail.com>
|
|
Handle all termination signals that we're allowed to handle (SIGKILL
can't be handled) in order to exit gracefully in any regular termination
case.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
In a situation where the IP that you wish to use as the source address
differs from the interface it needs to be sent from, it is now possible
to manually specify an address to bind to whilst still being able to
specify the physical interface to send from.
[Fixed up whitespace, minor coding style and added man-page entry --DB]
Signed-off-by: Oliver Smith <oliver@zerolag.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Fix the following compiler warnings that occur when building with "-W
-Wall -Wextra":
astraceroute.c: In function ‘__assemble_data’:
astraceroute.c:255:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
astraceroute.c:262:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
astraceroute.c: In function ‘check_ipv4’:
astraceroute.c:425:56: warning: unused parameter ‘ttl’ [-Wunused-parameter]
astraceroute.c: In function ‘handle_ipv4’:
astraceroute.c:451:49: warning: unused parameter ‘len’ [-Wunused-parameter]
astraceroute.c: In function ‘check_ipv6’:
astraceroute.c:511:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
astraceroute.c:491:56: warning: unused parameter ‘ttl’ [-Wunused-parameter]
astraceroute.c: In function ‘handle_ipv6’:
astraceroute.c:517:49: warning: unused parameter ‘len’ [-Wunused-parameter]
astraceroute.c: In function ‘__process_node’:
astraceroute.c:690:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
astraceroute.c: In function ‘__process_time’:
astraceroute.c:738:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
astraceroute.c:755:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
astraceroute.c:765:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
astraceroute.c: In function ‘__process_ttl’:
astraceroute.c:846:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
astraceroute.c: In function ‘main’:
astraceroute.c:1060:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Packet lengths are strictly positive and the functions dealing with them
(sendto(), recvfrom() etc.) take size_t, thus use size_t.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
In order to be able to better track regressions or to give support,
let us track the Git id as well in version information. This makes
the ``--version'' switch actually useful.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Finally eliminate xutils.{c,h} and move the rest to epoll2.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Add an extra file for signal handling functions.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Remove them from xutils, and add them to socket management.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Move those functions out so that they can be more easily maintained
in its separate file.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Rename xio to ioops (io-ops) and boil its include files down to a
minimum.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Break this out so that we only need to have sigint non-static where
it is really needed.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Include long version string into tools when called with --version.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Add the __noreturn attribute to all functions which wont return
but call die() themselves to exit().
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Mention the fact that astraceroute exits after printing either the help
of the version information.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Remove various unreachable sections from the switch statements. This
was detected by the coverty scanner.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Coverty detected a misuse of the getnameinfo API, thus, we
need to fix the length parameter.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
We decided to get rid of the old Git history and start a new one for
several reasons:
*) Allow / enforce only high-quality commits (which was not the case
for many commits in the history), have a policy that is more close
to the one from the Linux kernel. With high quality commits, we
mean code that is logically split into commits and commit messages
that are signed-off and have a proper subject and message body.
We do not allow automatic Github merges anymore, since they are
total bullshit. However, we will either cherry-pick your patches
or pull them manually.
*) The old archive was about ~27MB for no particular good reason.
This basically derived from the bad decision that also some PDF
files where stored there. From this moment onwards, no binary
objects are allowed to be stored in this repository anymore.
The old archive is not wiped away from the Internet. You will still
be able to find it, e.g. on git.cryptoism.org etc.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|