Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
schweikert committed Jan 11, 2017
2 parents 672a51c + 194325e commit 34d2fa4
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 8 deletions.
8 changes: 7 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
2017-01-11 David Schweikert <[email protected]>
* Version 3.15
* (bugfix) Fix compiler errors on platforms other than Linux (related
to the new -M option, #109)
* Test suite fixes for macOS

2017-01-10 David Schweikert <[email protected]>
* Version 3.14
* (feature) Ignore network and broadcast for cidrs /31 and /32 (#102, Martin Topholm)
* (feature) New option '-M' to set the "Don't Fragment" flag (#91, Don Bowman)
* (feature) New option '-N' to output statistics for netdata (see: https://my-netdata.io/, #10, Costa Tsaousis)
* (feature) New option '-N' to output statistics for netdata (see: https://my-netdata.io/, #105, Costa Tsaousis)
* (feature) New option '-o' to calculate total outage time (#90, @jgerbeck)
* (bugfix) Exit code should be 2 when the hostname can't be resolved
(fixes #98, reported by @green-fox)
Expand Down
2 changes: 1 addition & 1 deletion ci/test-14-ping-internet-hosts.pl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

# fping6 -A -n
SKIP: {
if(system("/sbin/ifconfig | grep inet6") != 0) {
if(system("/sbin/ifconfig | grep inet6.*Scope:Global") != 0) {
skip 'No IPv6 on this host', 3;
}
my $cmd = Test::Command->new(cmd => "fping6 -n -A 2001:4860:4860::8888");
Expand Down
10 changes: 9 additions & 1 deletion ci/test-issue-56.pl
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#!/usr/bin/perl -w

# regression testing for github issue #56
#
use Test::Command;
use Test::More;

use Test::Command tests => 3;
if( $^O eq 'darwin' ) {
plan skip_all => 'Test disabled on MacOS';
exit 0;
}

plan tests => 3;

my $cmd1 = Test::Command->new(cmd => "fping -t100 -p100 -C3 255.255.255.255");
$cmd1->exit_is_num(1);
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure script.
dnl Minimum Autoconf version required.
AC_PREREQ(2.59)

AC_INIT([fping],[3.14])
AC_INIT([fping],[3.15])

dnl make ipv4 and ipv6 options
AC_ARG_ENABLE([ipv4],
Expand Down
4 changes: 4 additions & 0 deletions doc/fping.pod
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ Set the "Don't Fragment" bit in the IP header (used to determine/test the MTU).

Same as -d.

=item B<-N>

Format output for netdata (-l -Q are required). See: https://my-netdata.io/

=item B<-o>

Calculate "outage time" based on the number of lost pings and the interval used (useful for network convergence tests).
Expand Down
13 changes: 9 additions & 4 deletions src/fping.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,17 @@ int main( int argc, char **argv )
switch( c )
{
case 'M':
#ifdef IP_MTU_DISCOVER
{
int val = IP_PMTUDISC_DO;
if (setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER, &val, sizeof(val))) {
perror("setsockopt IP_MTU_DISCOVER");
}
int val = IP_PMTUDISC_DO;
if (setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER, &val, sizeof(val))) {
perror("setsockopt IP_MTU_DISCOVER");
}
}
#else
fprintf(stderr, "-M option not supported on this platform\n");
exit(1);
#endif
break;

case 't':
Expand Down

0 comments on commit 34d2fa4

Please sign in to comment.