[Toybox] Question about ping.

Rob Landley rob at landley.net
Sun Oct 12 17:51:13 PDT 2014


I've been working on ping (for far too long) and I finally tracked down
the "ping without root access" patch I remembered seeing a few years ago.

It's https://lwn.net/Articles/420799/ and example code (well, diff
switching to use this) is at
http://openwall.info/wiki/_media/segoon/iputils-ss020927-pingsock.diff

It went into the kernel shortly before the 3.0 release (commit
c319b4d76b9e), meaning it's not there in 2.6.39 but it's there since
3.0, and given 3.16 shipped already and they're doing quarterly releases
that's almost 4 years of kernels that support it. I think that includes
at least one android release already.

My question is: should I _also_ include the old raw socket support (as a
fallback? With a config option?) or is it good enough to just have this
and not support ping on 2.6 kernels? (It's easy enough to make it
compile even when it does work, or to have a compile-time probe to
switch it off in defconfig...)

It does mean this command wouldn't be available from my oldest test
build environment (ubuntu 8.04) but that LTS is no longer supported and
can't necessarily even be installed anymore (the apt went away) so
possibly I'm being a bit TOO conservative about supporting old build
environments?

I'm interested in hearing people's opinions on this one. I can make the
new codepath work and then add the old one later, so there's no rush on
deciding...

Rob


 1413161473.0


More information about the Toybox mailing list