| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recently added localization support should needs to be turned on by default
to gain traction from translations. Without this it is hopeless to get
contributions going on.
The rarpd is obsoleted by BOOTP and later DHCP protocols. There should not
be reason why this executable ought to be build and packaged by default to
pretty much all distributions.
The traceroute6 is not needed, tracepath -6 can perform the same function,
so drop it from default build as well.
Addresses: https://github.com/iputils/iputils/issues/162
CC: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to great amount of change in this update normal review is not possible.
I used following to ensure there are no unexpected changes.
# Generate old manual pages.
git checkout origin/master
make clean && make
mkdir a
for i in builddir/doc/*; do man $i > a/${i##*/}; done
# Generate new manual pages.
git checkout <this-branch>
make clean && make
mkdir b
for i in builddir/doc/*; do man $i > b/${i##*/}; done
# Compare.
diff -ruP a b
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
The -DRDISC_SERVER was true before meson build, now one needs to use 'meson
configure builddir -DENABLE_RDISC_SERVER=true' if these features are needed.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
While going through this manual page I noticed --help output being
incomplete, so lets sort that out in same go.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Following warning is false positive, niquery_option_subject_name_handler()
calls error() that terminates the program - but compiler does not know that
because error() can be called non-terminating way. So lets a call to
abort() that will terminate, and cause core as a sign of bug if error() ever
falls through.
ping6_common.c:494:1: warning: control reaches end of non-void function
[-Wreturn-type]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
| |
Reference: aeec6a0a5247a2526306479f57f987bf6c09f3d8
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
Aboid boilerplating.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
../clockdiff.c:307:11: warning: ‘histime1’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
../clockdiff.c:295:10: warning: ‘histime’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
The measure() was a bit too long and deeply indented (8 steps).
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
Writing nearly same function twice is not the best way.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
In same go get rid of function like define, and convert magic values to
enums that are more friendly to debuggers such as gdb.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
Reindent file and move declarations to top of the file.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
All warnings should be fixed.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arithmetic on a pointer to void is a GNU extension [-Wpointer-arith]
comparison of integers of different signs: '__u32' (aka 'unsigned int') and
'int' [-Wsign-compare]
And in ni_ifaddrs.c: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
Reference: https://github.com/iputils/iputils/pull/160#issuecomment-441390212
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
| |
Addresses: https://github.com/iputils/iputils/issues/157
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
The error() function will print wanted message regardless what is the errno
value, including zero.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
Some of these values are in kernel user api, but because includes redefine
same variable names using system headers is not an option. While on it add
icmp types that were earlier unknown to traceroute6.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
| |
Use clock_gettime(3) CLOCK_MONOTONIC_RAW to determine time difference. This
measurement is ideal to this use case, as in traceroute6 one does not care
what is the time but how long packages are traveling back and forth. Notice
that CLOCK_MONOTONIC_RAW is not subject to discontinuous jumps by system
administrator manually adjusting time, or incremental adjustments performed
by adjtime(3) and NTP.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
Reindent source, get rid of casting return values to (void), sort includes,
and get rid of function like defines.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
And add static keyword to local functions. The tvsub() was also removed as
it is not even used.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
In same go make runtime pointer read-only.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
Use appropriate function to substract timeval data format, and be more
cautious to avoid integer overflow.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
Value that is not within expected range should not be used.
Reference: 608419a7804caf36a359875d2fdae0b3eb181387
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
Rather than using preprocessor #define's use enum values, that are visible
for debuggers. That said icmp values are from headers where they are
defined.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
Reindent the source file, sort includes, and such.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
This change is similar to arping change that moved global variables to run
state structure.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
Raw clock is not subject of NTP or adjtime time changes that could distort
measurements.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
Old glibc did not have clock_gettime() that was part of librt, but since
glibc 2.17 (December 2012), the library linking -rt is no longer required.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
Fix indentation, ort includes, move declarations to top of file and some
other cosmetic improvements.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
Stop using plain signals to coordinate when timer expires or to request
exit. The point if of this change is to make it easier to understand
control flow when it does not rely on jumps via signal handler.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
Advantage of this is clear when if you look set_device_broadcast...()
functions that are not a lot easier to understand. That said these three
functions are now so trivial that collapsing them is the next obvious step.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is first commit in refactoring effort. Global variables are simply
replaced by equivalent struct run_state names. As one can quite clearly see
some functions are taking multiple runtime variables as input, these can be
reduced to passing of the main struct.
Secondly, the finish() and catcher() do not take run state argument. This
is because these functions are used in signal handler. Easy fix is to make
signal handling to use signalfd(). I will come back to this later.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 only call to check_nigroup() has not been compiled in latest 13 releases
(from s20121125 to s20180629). It is time to remove the dead code.
Reference: 0ae42139342f47a5a62977346f095fd94e1508c2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
| |
Mark device variable to be shared in ping source files. This fixes
linker issue that is reported when al gcc warnings are enabled.
/usr/bin/ld: ping@exe/ping6_common.c.o:(.bss.device+0x0): multiple
definition of `device'; ping@exe/ping.c.o:(.bss.device+0x0): first
defined here
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
Remove obsolete files, reindent and wrap meson lines, and sort out ninfod
build system fixme markup.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Finding latest version fails too often following way.
http://: Invalid host name.
The command "wget "$NINJA_LATEST"" failed and exited with 1 during .
That ninja version was created at 2017-09-11 so it is not changing all the
time. I guess it's fine to hardcode this, and review if the version is
still the latest before iputils release.
Reference: https://travis-ci.org/iputils/iputils/jobs/447360838
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
arping.c:106:18: runtime error: member access within null pointer of type
'struct sockaddr_ll'
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Despite the fact preprocessor variable name is ENABLE_DEBUG these are
generally useful messages about what failed and how.
In same go fix a warning added in 90d90f40f1f7fa72016e1dbaa5ea18d0dd175dc6.
ninfod/ninfod_core.c:435:6: warning: explicitly assigning value of variable
of type 'int' to itself [-Wself-assign]
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
|