profile
viewpoint

bkuker/motorsim 10

Solid rocket motor simulation

bkuker/dispersion 7

OpenRocket dispersion tool.

bkuker/JSONView-for-Chrome 1

JSONView for Chrome

bkuker/ace 0

Ace (Ajax.org Cloud9 Editor)

bkuker/arduino-focuser-moonlite 0

Arduino-based stepper motor focuser using AdaFruit shield and emulating Moonlite protocol

pull request commentschweikert/fping

Deal with multiple fping processes with colliding ICMP idents getting wrong echo reply

Coverage Status

Coverage increased (+0.1%) to 81.098% when pulling 6c7bdb12b479d10333210896fe51b61693a350f6 on clarsen:fix_spurious_response into eac20347bac9aa396fa1c2039c57e7603862e6cc on schweikert:develop.

clarsen

comment created time in 8 days

PR opened schweikert/fping

Deal with multiple fping processes with colliding ICMP idents getting wrong echo reply

Fix for https://github.com/schweikert/fping/issues/206. It's a slow linear search, but more simple is more correct.

+16 -0

0 comment

1 changed file

pr created time in 8 days

issue openedschweikert/fping

fping responses misdelivered on FreeBSD

On FreeBSD, the PIDs are as large as 99999, so if multiple fping processes are running there's a chance ident4 = PID & 0xffff will collide - which happens on monitoring hosts, like Nagios, that run fping often and simultaneously on a single IP address.

If you have one IP up and one IP down and the two fping's PID ident4s collide, then the process pinging the down IP may see a reply from the up IP.

While the FreeBSD implementation of ping calls connect() which results in echo replies from undesired hosts being dropped before ever being delivered to the process, fping doesn't, so it has to rely on ICMP identifier to filter out the undesired responses.

It appears wait_for_reply() although it filters out ICMP identifier mismatch, it doesn't filter out on source IP address.

created time in 8 days

PR opened schweikert/fping

V4.x

i want

+60 -39

0 comment

8 changed files

pr created time in a month

push eventschweikert/fping

Henrique de Moraes Holschuh

commit sha 59d83ed4020673ec09238bbb1cff275158b590a6

fping: retain privileges until after privileged setsockopt On Linux, one needs privileges to setsockopt(SO_BINDTODEVICE), and the current code would drop setuid root privileges too soon. Temporarily drop privileges instead, and raise them back to issue the privileged setsockopt(). Once we know we won't need to do any further privileged setsockopt(), permanently drop privileges. For now, assume SO_BINDTODEVICE is the only setsockopt that needs this.

view details

David Schweikert

commit sha eac20347bac9aa396fa1c2039c57e7603862e6cc

Merge pull request #200 from simetnicbr/for-upstream/privileged-SO_BINDTODEVICE fping: retain privileges until after privileged setsockopt

view details

push time in 2 months

PR merged schweikert/fping

fping: retain privileges until after privileged setsockopt

On Linux, one needs privileges to setsockopt(SO_BINDTODEVICE), and the current code would drop setuid root privileges too soon.

Temporarily drop privileges instead, and raise them back to issue the privileged setsockopt(). Once we know we won't need to do any further privileged setsockopt(), permanently drop privileges.

For now, assume SO_BINDTODEVICE is the only setsockopt that needs this.

+49 -6

3 comments

1 changed file

hmh

pr closed time in 2 months

pull request commentschweikert/fping

fping: retain privileges until after privileged setsockopt

Looks good, thanks!

hmh

comment created time in 2 months

push eventschweikert/fping

Dirk Meyer

commit sha 60bd16119d99a674f4cff54b479bef1a826018ee

- fix regression introduced in fping 4.3 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

view details

David Schweikert

commit sha a459f2ade50b49314d8372dffaefc71c6d4b5c3c

update changelog

view details

push time in 2 months

push eventschweikert/fping

Dirk Meyer

commit sha 31f76f607158997ab3967d0ee61404b263e754b3

- fix regression introduced in fping 4.3 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

view details

David Schweikert

commit sha 49673f7862f04a89197c70e6bc737647b4a65173

Merge pull request #198 from dinoex/develop - fix regression introduced in fping 4.3

view details

push time in 2 months

PR merged schweikert/fping

- fix regression introduced in fping 4.3

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

+2 -2

3 comments

1 changed file

dinoex

pr closed time in 2 months

push eventschweikert/fping

German Service Network

commit sha f2b2cdf620863751c7c7d5aca0dadc4c2057a929

Update Azure Pipline based on travis-ci tuning

view details

David Schweikert

commit sha ce9d6b351ecbb1e279c441dbf185051d9a4a6b65

Merge pull request #197 from gsnw/develop Update Azure Pipline based on travis-ci tuning

view details

push time in 2 months

PR merged schweikert/fping

Update Azure Pipline based on travis-ci tuning

I changed the azure-pipelines.yml to the new scripts in the ci folder

+9 -9

1 comment

1 changed file

gsnw

pr closed time in 2 months

issue commentschweikert/fping

fping v4 for windows?

In case it helps someone, there are many Docker images. The most popular seems to be this.

It seems so complex to me 😓

molchanov1983

comment created time in 2 months

issue commentschweikert/fping

fping v4 for windows?

In case it helps someone, there are many Docker images. The most popular seems to be this.

molchanov1983

comment created time in 2 months

pull request commentschweikert/fping

- fix regression introduced in fping 4.3

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

dinoex

comment created time in 2 months

pull request commentschweikert/fping

JSON output support with --json/-J option

This is really useful feature for us, talking from Zabbix perspective. I'd agree with @bkuker that it makes more sense to not list tags that have no values.

OK here are my 2 cents. I have grouped the output in targets, within those there is data for each packet and summary. Also, I have added some ideas about error handling:

{
    "error": "in case of error",
    "targets": {
        "dns.google.com": {
            "addr": "8.8.8.8",
            "packets": [
                {
                    "bytes": 64,
                    "rtt": 3.29,
                    "avg": 3.35,
                    "loss": 11,
                    "source": "4.4.4.4"
                },
                {
                    "error": "timed out"
                }
            ],
            "summary": {
                "min": 21.29,
                "avg": 22.29,
                "max": 23.89
            }
        },
        "7.7.7.7": {
            "addr": "7.7.7.7",
            "packets": [
                {
                    "error": "timed out"
                },
                {
                    "error": "timed out"
                }
            ],
            "summary": {}
        }
    }
}
Reperator

comment created time in 2 months

issue openedschweikert/fping

-S with IPv6 address generates error using musl

When using musl instead of glibc, -S with an IPv6 address fails with "fping; cannot bind source address : Address not available". I do not know why musl is different than glibc, but it seems to be fixed by this PR: - fix regression introduced in fping 4.3.

created time in 3 months

issue openedschweikert/fping

Datetime with -Q behaves strangely

Hi,

I am running this program at 02:27 (at night/early morning) however the output from fping believes it is 14:42, first I thought it interpreted 02: as 14:, but the minutes are also off by 15 minutes compared to the system clock:

$ echo $(date) && fping -B 1 -D -r0 -O 0 -p 1000 -Q 10 -l billetto.dk
Mon Sep 14 02:27:57 BST 2020
[14:42:09]
billetto.dk : xmt/rcv/%loss = 10/10/0%, min/avg/max = 22.6/24.8/33.1
[14:42:19]
billetto.dk : xmt/rcv/%loss = 10/10/0%, min/avg/max = 22.3/26.3/46.0
[14:42:29]
billetto.dk : xmt/rcv/%loss = 10/9/10%, min/avg/max = 22.2/24.5/31.6

Version

Installed through Homebrew on OSX Catalina.

$ fping -v
fping: Version 5.0

created time in 3 months

pull request commentschweikert/fping

Add support for -k/--fwmark option

@hmh I just looked at #200 and agree it will be trivial to merge with this one (or vice versa).

I checked a diskless embedded linux implementation and see what you mean about not having xattr support.

So either order of merge is fine by me also. I will update the request if needed.

tomangert

comment created time in 3 months

pull request commentschweikert/fping

Add support for -k/--fwmark option

So, to be very clear, I have no objections against the merge of this PR in its current state.

tomangert

comment created time in 3 months

pull request commentschweikert/fping

Add support for -k/--fwmark option

Yes, cap_net_raw works for SO_BINDTODEVICE.

However, without my extra changes to unbreak setuid (or some other change to the same effect), fping remains half-broken on a very large set of machines that cannot operate with capabilites. E.g. every small OpenWrt router. They simply don't use filesystems (and in some case, deployment and update methods) that can deal with extended attributes. That means effectively no capabilities support, even if it is Linux, and even if capabilities are enabled in the kernel.

I am not against merging this PR as-is. I will just adjust mine to also fix -k/--fwmark if it lands first, because I believe fping should work in setuid mode just as well as it does with capabilities.

tomangert

comment created time in 3 months

pull request commentschweikert/fping

Add support for -k/--fwmark option

Checked the kernel source. cap_net_raw should work for SO_BINDTODEVICE, but I didn't try it.

tomangert

comment created time in 3 months

pull request commentschweikert/fping

Add support for -k/--fwmark option

Yes it looks like the same thing. At least for fwmark there is cap_net_admin as a workaround. For SO_BINDTODEVICE I don't see a capability that will work documented anywhere.

tomangert

comment created time in 3 months

pull request commentschweikert/fping

Add support for -k/--fwmark option

This is rather strange, unrestricted root + setuid root should be very much equivalent to all capabilities.

Are you sure there is not something else at play, like SELinux or AppArmor, or your "root" has a reduced capability set?

tomangert

comment created time in 3 months

pull request commentschweikert/fping

Add support for -k/--fwmark option

For --fwmark to work either run as root or set the cap_net_raw and cap_net_admin file capabilities. setuid does not work for fwmark.

sudo chmod u-s /usr/bin/fping sudo setcap "cap_net_admin,cap_net_raw+ep" /usr/bin/fping

README.md ci/prepare-linux.sh and contrib/fping.spec can be updated to reflect this. I will add those changes.

tomangert

comment created time in 3 months

pull request commentschweikert/fping

Add support for -k/--fwmark option

Satisfies Issue #158

I am not configured to test ipv6 but it should work.

tomangert

comment created time in 3 months

pull request commentschweikert/fping

Add ipv4 support for -k/--fwmark option

Coverage Status

Coverage remained the same at ?% when pulling 580b8146a7bc6153cd559d1924fc1ce754b9729c on tomangert:develop into 296de3d7a28b68476e42409cfd6fdff835a47146 on schweikert:develop.

tomangert

comment created time in 3 months

PR opened schweikert/fping

Add ipv4 support for -k/--fwmark option
+12 -0

0 comment

1 changed file

pr created time in 3 months

issue openedschweikert/fping

fping not working on Synology DiskStation.

Tried from Entware, and compiling myself.

It installs, I can change permissions for setuid, but only fping -h returns something. Anything else returns nothing (and return code 4), even fping -v

root@Mnemosyne:~# ls -l /usr/local/sbin/fping -rwsr-xr-x 1 root root 115240 Sep 3 18:19 /usr/local/sbin/fping root@Mnemosyne:~# file /usr/local/sbin/fping /usr/local/sbin/fping: setuid ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /opt/lib/ld-linux.so.3, for GNU/Linux 2.6.32, with debug_info, not stripped root@Mnemosyne:~# fping -v root@Mnemosyne:~# echo $? 4 root@Mnemosyne:~# uname -a Linux Mnemosyne 3.2.40 #25426 SMP Wed Jul 8 03:10:10 CST 2020 armv7l GNU/Linux synology_comcerto2k_ds414j

created time in 3 months

more