Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- fix regression introduced in fping 4.3 #198

Merged
merged 1 commit into from
Oct 17, 2020
Merged

- fix regression introduced in fping 4.3 #198

merged 1 commit into from
Oct 17, 2020

Conversation

dinoex
Copy link
Contributor

@dinoex dinoex commented Aug 20, 2020

bind to source only when option was set.
this allows to work in jails and lxc with custom IPs.
this allows IPv4 only and IPv6 only hosts

bind to source only when option was set.
this allows to work in jails and lxc with custom IPs.
this allows IPv4 only and IPv6 only hosts
@coveralls
Copy link

coveralls commented Aug 20, 2020

Coverage Status

Coverage decreased (-0.02%) to 81.668% when pulling 31f76f6 on dinoex:develop into 296de3d on schweikert:develop.

@frenchie
Copy link

More info is available on the FreeBSD bug report, Comment 7.

Regression introduced by commit 1486bf2.

@dinoex
Copy link
Contributor Author

dinoex commented Oct 9, 2020

Coverage decreased is expected.
with this patch we only bind with the address family in use, not both.

@schweikert schweikert merged commit 49673f7 into schweikert:develop Oct 17, 2020
@tohojo
Copy link
Contributor

tohojo commented Mar 20, 2021

This seems to have broken fping on Linux (Arch Linux 5.11 running as a local user):

$ git reset --hard origin/develop
HEAD is now at eac20347bac9 Merge pull request #200 from simetnicbr/for-upstream/privileged-SO_BINDTODEVICE
$ make
/usr/bin/make  all-recursive
make[1]: Entering directory '/home/build/git/fping'
Making all in doc
make[2]: Entering directory '/home/build/git/fping/doc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/build/git/fping/doc'
Making all in src
make[2]: Entering directory '/home/build/git/fping/src'
gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wno-sign-compare -DIPV6 -g -O2 -MT fping-fping.o -MD -MP -MF .deps/fping-fping.Tpo -c -o fping-fping.o `test -f 'fping.c' || echo './'`fping.c
mv -f .deps/fping-fping.Tpo .deps/fping-fping.Po
gcc -Wall -Wextra -Wno-sign-compare -DIPV6 -g -O2   -o fping fping-fping.o fping-seqmap.o fping-socket4.o fping-optparse.o fping-socket6.o  
make[2]: Leaving directory '/home/build/git/fping/src'
make[2]: Entering directory '/home/build/git/fping'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/home/build/git/fping'
make[1]: Leaving directory '/home/build/git/fping'
$ ./src/fping -D -c 1 127.0.0.1 -z 1
./src/fping:
  count: 1, retry: 3, interval: 10 ms
  perhost_interval: 1000 ms, timeout: 1000
  ping_data_size = 56, trials = 4
  count_flag set
  backoff_flag set
  per_recv_flag set
[1616254202.57978] 127.0.0.1 [0]: add ping event in 0 ms
[1616254202.57978] # main_loop
[1616254202.57978] 127.0.0.1 [0]: ping event
[1616254202.57989] seqmap_add(host: 0, index: 0) -> 0
[1616254202.57989] 127.0.0.1 [0]: send ping
[1616254202.57989] 127.0.0.1 [0]: add timeout event in 1000 ms
[1616254202.57989] next timeout event in 1000 ms (127.0.0.1)
[1616254202.57989] waiting up to 1000 ms
[1616254202.58004] # main_loop
[1616254202.58004] next timeout event in 1000 ms (127.0.0.1)
[1616254202.58004] waiting up to 1000 ms
[1616254203.58102] # main_loop
[1616254203.58102] 127.0.0.1 [0]: timeout event
[1616254203.58102] 127.0.0.1 : [0], timed out (NaN avg, 100% loss)

127.0.0.1 : xmt/rcv/%loss = 1/0/100%
1 $ git revert 31f76f607158
Auto-merging src/fping.c                       
[develop 191adae5a42b] Revert "- fix regression introduced in fping 4.3"
 1 file changed, 2 insertions(+), 2 deletions(-)
$ make
/usr/bin/make  all-recursive
make[1]: Entering directory '/home/build/git/fping'
Making all in doc
make[2]: Entering directory '/home/build/git/fping/doc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/build/git/fping/doc'
Making all in src
make[2]: Entering directory '/home/build/git/fping/src'
gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wno-sign-compare -DIPV6 -g -O2 -MT fping-fping.o -MD -MP -MF .deps/fping-fping.Tpo -c -o fping-fping.o `test -f 'fping.c' || echo './'`fping.c
mv -f .deps/fping-fping.Tpo .deps/fping-fping.Po
gcc -Wall -Wextra -Wno-sign-compare -DIPV6 -g -O2   -o fping fping-fping.o fping-seqmap.o fping-socket4.o fping-optparse.o fping-socket6.o  
make[2]: Leaving directory '/home/build/git/fping/src'
make[2]: Entering directory '/home/build/git/fping'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/home/build/git/fping'
make[1]: Leaving directory '/home/build/git/fping'
$ ./src/fping -D -c 1 127.0.0.1 -z 1
./src/fping:
  count: 1, retry: 3, interval: 10 ms
  perhost_interval: 1000 ms, timeout: 1000
  ping_data_size = 56, trials = 4
  count_flag set
  backoff_flag set
  per_recv_flag set
[1616254232.26669] 127.0.0.1 [0]: add ping event in 0 ms
[1616254232.26669] # main_loop
[1616254232.26669] 127.0.0.1 [0]: ping event
[1616254232.26677] seqmap_add(host: 0, index: 0) -> 0
[1616254232.26677] 127.0.0.1 [0]: send ping
[1616254232.26677] 127.0.0.1 [0]: add timeout event in 1000 ms
[1616254232.26677] next timeout event in 1000 ms (127.0.0.1)
[1616254232.26677] waiting up to 1000 ms
[1616254232.26689] seqmap_fetch(0) -> host: 0, index: 0
[1616254232.26689] received [0] from 127.0.0.1
[1616254232.26689] 127.0.0.1 : [0], 64 bytes, 0.124 ms (0.124 avg, 0% loss)

127.0.0.1 : xmt/rcv/%loss = 1/1/0%, min/avg/max = 0.124/0.124/0.124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants