[Pkg-nagios-devel] Bug#863981: check_ping uses IPv6 with -4

Ondřej Caletka Ondrej.Caletka at cesnet.cz
Mon Oct 1 13:57:21 BST 2018

Dear Jan,

I just came across this issue recently:

On Tue, 11 Jul 2017 12:29:32 +0200 Jan Wagner <waja at cyconet.org> wrote:
> <- snip ->
> Depends: inetutils-ping (>= 2:1.9-1~) [kfreebsd-any hurd-any],
>          iputils-ping [linux-any],
> <- snap ->
> inetutils-ping and older iputils-ping (when backporting) doesn't support
> "ping -4". So this is something that has to be discovered at buildtime I
> think.

As I see the rules file for this package, there is already compile-time
detection between Linux and other kernels:

> ifeq ($(DEB_HOST_ARCH_OS),linux)
> PING_CONFIGURE_ARGS = --with-ping-command="/bin/ping -n -U -w %d -c %d %s" \
>                       --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s"
> else
> PING_CONFIGURE_ARGS = --with-ping-command="/bin/ping -n -w %d -c %d %s" \
>                       --with-ping6-command="/bin/ping6 -n -w %d -c %d %s"
> endif

So I believe this bug could be easily fixed by changing the first ping
command to `ping4` command (or to `ping -4`, which should be
functionally equivalent), while keeping legacy ping and ping6 in the
"else" branch of this snippet.

Am I missing something?

Best regards,
Ondřej Caletka

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3718 bytes
Desc: Elektronicky podpis S/MIME
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-devel/attachments/20181001/a1a55da1/attachment.bin>

More information about the Pkg-nagios-devel mailing list