Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Aug 2019 21:47:26 -0400
From:      Shawn Webb <shawn.webb@hardenedbsd.org>
To:        Hiroki Sato <hrs@allbsd.org>
Cc:        asomers@FreeBSD.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r351423 - in head: . sbin/ping6 sbin/ping6/tests
Message-ID:  <20190826014726.mwddt4uwqoulewhh@mutt-hbsd>
In-Reply-To: <20190826.042056.1329861772202588895.hrs@allbsd.org>
References:  <201908231522.x7NFMLuJ068037@repo.freebsd.org> <20190826.042056.1329861772202588895.hrs@allbsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--63e6t6wtjncgu5iy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 26, 2019 at 04:20:56AM +0900, Hiroki Sato wrote:
> Hi,
>=20
> Alan Somers <asomers@FreeBSD.org> wrote
>   in <201908231522.x7NFMLuJ068037@repo.freebsd.org>:
>=20
> as> Author: asomers
> as> Date: Fri Aug 23 15:22:20 2019
> as> New Revision: 351423
> as> URL: https://svnweb.freebsd.org/changeset/base/351423
> as>=20
> as> Log:
> as>   ping6: Rename options for better consistency with ping
> as>  =20
> as>   Now equivalent options have the same flags, and nonequivalent optio=
ns have
> as>   different flags.  This is a prelude to merging the two commands.
> as>  =20
> as>   Submitted by:	J?n Su?an <sucanjan@gmail.com>
> as>   MFC:		Never
> as>   Sponsored by:	Google LLC (Google Summer of Code 2019)
> as>   Differential Revision:	https://reviews.freebsd.org/D21345
>=20
>  I have an objection on renaming the existing option flags in ping6(8)
>  for compatibility with ping(8).
>=20
>  Is it sufficient to add INET6 support to ping(8) with consistent
>  flags and keep CLI of ping6(8) backward compatible?  People have used
>  ping6(8) for >15 years, so it is too late to rename the flags.  I do
>  not think the renaming is useful if "ping -6 localhost" or "ping ::1"
>  works.

I wonder if something like this could be done:

Somewhere in ping(8):
bool ping6_compat;
if (strcmp(argv[0], "ping6")) {
	ping6_compat =3D true;
}
=2E..
if (ping6_compat) {
	do_this();
} else {}
	do_that();
}

And sbin/ping/Makefile:
LINKS+=3Dsbin/ping sbin/ping6

(Note that I didn't check if sbin/ping/Makefile already set LINKS. If
it doesn't, it'd be "LINKS=3D", of course.)

Then, ping(8) and ping6(8) still are the same binary and backwards
compat is maintained, at least until spray paints the neon pink bike
shed. (Note: I am in no way saying this discussion is a bike shed. I'm
_only_ making a joke as a nod to the idiomatic expression.)

Thanks,

--=20
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

Tor-ified Signal:    +1 443-546-8752
Tor+XMPP+OTR:        lattera@is.a.hacker.sx
GPG Key ID:          0xFF2E67A277F8E1FA
GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9  3633 C85B 0AF8 AB23 0FB2

--63e6t6wtjncgu5iy
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAl1jOigACgkQ/y5nonf4
4frgYw/9ELxk7ab6jWJaadj3jql60yKBQMcPEiLCzd1UZYe3528CKs1TIKPnbN7x
mTAhEusRs/GJabiQaB9rbhKgWgKv293wsGXV1t/NW/AwQS6o0DWrFXrCaTI3wIkU
Oj+EFw4amq0bHlxRnk/fDGRC+JIcL0WljGAd0WUzzFzPkd/3KHNjXS8He4shk3kc
ld2YWPyNzjH4NqMItouqeJlJZw9HvTIxdsW1jle33QJKI3087ZBK76IJmIhA14um
xU5WW0yJmjpryalnX3s38jsOPOUeer1CbyE06QKwB+13S5T+eBo1YAgu3sQ0dhRQ
jf30hcN/AwtwVihh4a22c/yztW4avL2C1EXGmJrQjnfSN5O0a1afEM/TUoD/6ChR
XwO6aAC8djEP9VZsVKV9IVwKpCUcOMlE252JKLCigMpKNf+0SvUQi+SJzOBPA+pB
+X2eRO9oHMO2fssAP6wqlNqhI+0lveTVPORFSjmCqIBKezDMeLJLDd23CbyC32d+
mtpU3NOCafiYGMXT26KcI5/a8aRtK8BgwCFoyLxDr82ro/Kly5TXTrULET5w0iqJ
wrQ6l5qc7qZIHHX0DWq+BdX84KM4s8CkRqKQY01Vi8qqkVxbpCGU7DSNQcdA0q2t
2jfGNpqEPe0mBCHMX3cd0Gc1s1OaD/udTRR8sMC6Qh6lBaB0Fl4=
=6BTW
-----END PGP SIGNATURE-----

--63e6t6wtjncgu5iy--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190826014726.mwddt4uwqoulewhh>