| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit f455fee41c077d4b700a473b2f5b3487b8febc1d made ping to bind to device
when a device argument was given. But that to does not work if destination
IP on device that socket binds to. See below how to reproduce this issue.
# ip addr show dev eth0 | grep 'inet '
inet 192.168.122.100/24 brd 192.168.122.255 scope global eth0
# ping -I eth0 192.168.122.100
PING 192.168.122.100 (192.168.122.100) from 192.168.122.100 eth0: 56(84) bytes of data.
<nothing... loops forever>
Easiest workaround is to cancel bind to device socket option when source and
destination IPs are the same and device option is defined.
Addresses: https://github.com/iputils/iputils/issues/104
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
| |
The getifaddrs(3) can return invalid data when system call is interrupted.
Issue was fixed in glibc 2.28 (relesed 2018-08-01). It is fair to assume
there are systems with older libc so make the ping more robust and check
ifa->ifa_name is not NULL before using it.
Reference: https://sourceware.org/bugzilla/show_bug.cgi?id=21812
Addresses: https://github.com/iputils/iputils/issues/112
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This option will allow to set time interval to use between packets sent.
It may become handy to work around timing issues in the network. For
example, Linux kernel as of the time of writing by default ignores all ARP
updates that arrive in 1-second interval since previous update for the same
table entry *irrespective of whether the previous update was ignored*. It
means that calling apring with -c 3 may still not affect Linux network peers
because every consequent update is ignored because of the previous ARP
update (that was also ignored).
In this scenario, we would now be able to call arping -i 2 to work that
kernel behaviour around.
Linux fix can be found in: https://patchwork.ozlabs.org/patch/760372/
|
|\
| |
| | |
arping: honor setting source to 0.0.0.0
|
|/
|
|
|
|
|
| |
Useful for using arping without having a local IP-address.
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Reference: https://github.com/iputils/iputils/pull/84
|
|\
| |
| | |
Updated version of pull 122 changes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Timeouts (-W) were previously silently rounded down to the next lower
integral number. Subsecond values were rounded to zero which resulted in
infinite timeouts, therefore ping never exited if there were no responses
and timeouts below 1s. This commit fixes this issue.
[Sami: I changed ping_strtod() to return double. Claudius did updated
needed value by pointer reference, and had multiplication by 1000 in
wrapper function. I think that made understanding the code unnecessarily
difficult, so implementation was slightly changed.]
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Reference: https://github.com/iputils/iputils/pull/122
|
| |
| |
| |
| |
| |
| |
| | |
Setting a timeout of zero (in fact: anything below one) makes ping wait
infinitely. This commit exits on such values
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
|
|\ \
| |/
|/| |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Users should use -6 when tracing network path to IPv6 destination. While
fixing this remove typo from traceroute6 manual, and fix build-sys issue
that the typo'ed note was talking about.
Addresses: https://github.com/iputils/iputils/issues/98
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|\ \
| | |
| | | |
More build sys fixes
|
| | |
| | |
| | |
| | |
| | |
| | | |
And move installation directory to sbin.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
The arping and clockdiff are command line tools, so it need file system
capability bit. The rarpd is ran by systemd and changing unit file is
better.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
| |
| |
| |
| |
| |
| | |
In systems without the headers for idn2, the build is failing as we
always set USE_IDN to 1.
Signed-off-by: Victor Toso <victortoso@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit d141cb6 ("ping: work with older kernels that don't support ping
sockets") fixed #54 with handling EPROTONOSUPPORT for IPv6. But some
systems return EPROTONOSUPPORT also for IPv4 (Debian 9.5 based container
with kernel 4.10).
NOTE: inet_create() (IPv4) and inet6_create() (IPv6) implementations in
kernel also returns ESOCKTNOSUPPORT (Socket type not supported), but we
check that with assert:
assert(socktype == SOCK_DGRAM || socktype == SOCK_RAW);
Fixes: #129
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
|
|\ \
| | |
| | | |
Add systemd rarpd and ninfod unit files
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In same go make service unit file to indicate which interface rarpd ought to
listen. The rarpd should not to go background, that helps systemd to know
what is going on with the process. And while one it lets harden rarpd unit
file to drop all unnecessary system access.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | | |
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|\ \ \
| |/ /
|/| | |
doc/ninfod: Fix the debug mode option (-a -> -d)
|
| | | |
|
|\ \ \
| |/ /
|/| | |
deprecate autotools in favour of meson
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Tested with archlinux musl 1.1.20-1 that also has kernel-headers-musl
3.12.6_6-1 package. Compilation worked when using following configuration
options.
$ meson builddir -DBUILD_NINFOD=false -DUSE_CAP=false -DUSE_CRYPTO=none -DUSE_IDN=false
Requested-by: David Heidelberg <david@ixit.cz>
Reference: https://github.com/iputils/iputils/pull/120
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Review of the meson build system pull request has taken a bit time, and
meanwhile there's been release so update the meson version to match the
latest tag.
Reference: https://github.com/iputils/iputils/pull/120
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since commit 63579a1b5bf61f0e03dd4e815386170d684797f7 the strncmp() has used
8 bytes as lenght of interface name, that has probabyly been more than
enough but lets make the comparison to work even when interface names are
extra ordinarily long.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The ping could not have been compiled on anything but linux since commit
87dbb3a5db657d5eae6934707beaf0507980a1c3 (May 2015), that is part of the
four most recent releases.
Considering there are are no reported portability bugs it is perhaps fair to
say iputils project does not need to be extremely consevative what comes to
avoiding portability issues. Or to say the same slightly differently using
linux only api's, features, and expecting fairly up to date libraries is
probabliy fine.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Capacity is preferred, but when that does not work make ping to be setuid
root binary, that is the legacy way to install this software.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This will cause the following warning when _FORTIFY_SOURCE= is in use. The
warning is explained in glibc. In short that is fine.
/usr/include/bits/string_fortified.h:90:10: warning: ‘__builtin___strcpy_chk’
writing 1 or more bytes into a region of size 0 overflows the destination
[-Wstringop-overflow=]
return __builtin___strcpy_chk (__dest, __src, __bos (__dest));
Reference: http://www.sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=abb66a672f5575a328d05c0790403af673d0f76c
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The words 'we cannot use "linux/in6.h" immediately' originate to commit
fed7e6306f37a18 from November 2012, that does not seem to be accurate
anymore.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Meson version 0.47.1 prints following warning.
meson.build:212: WARNING: Trying to compare values of different types
(DependencyHolder, list) using ==. The result of this is undefined and will
become a hard error in a future Meson release.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These variables are only set, but not used. There does not seem to be any
reason to keep them hanging around.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
All of these report same warning:
ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Values in buffer size definition can hold maxium lenght host name, longest
possible IPv6 address, and space for decorations. Earlier code may have
truncated names and addresses, that is unlikely ever wanted. Additionally
this fixes following warning.
rdisc.c:720:31: warning: ‘ (’ directive output may be truncated writing 2
bytes into a region of size between 1 and 1025 [-Wformat-truncation=]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Do not use of GNU ?: conditional. And avoid data type overflow by using
unsigned char data type.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | | |
These are cosmetic issues, that address clang warnings.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This ensures program name is always prefixed to error message. In same go
use similar style in all message, that is lower caps text and inclusion data
that is being complained about (when applicable).
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are better ways to debug allocations, for example valgrind and address
& leak sanitizers.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In same go simplify debuging functions, and fix couple conditional
compilations to work.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The HAVE_ definitions are based on header name, so generate them from input
to avoid mismatch errors.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now when project_arguments has -include config.h there is no need use
anything but config.h for preprocessor definitions.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The HAVE_* style is more common in other project, so change CAPABILITIES
definition to match that - that is also used in ninfod/*.c files.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Prefer the iputils_md5dig.h that works with nettle. In same make all the
crypto library variations to work without errors and warnings.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If enabled html manuals are installed to <prefix>/usr/share/iputils/
directory, that is probably a right location store these.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | | |
The INSTALL.md is removed as completely deprecated.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For some reason version print out was not implemented in all commands. This
fixes that.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|