selftests/net: in rxtimestamp getopt_long needs terminating null entry
authortannerlove <tannerlove@google.com>
Tue, 9 Jun 2020 21:21:32 +0000 (17:21 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jun 2020 14:40:32 +0000 (16:40 +0200)
commit57bad9e291e3e493b5fff5e785eb0e3dec78c6a7
treec4ecf90cca48feff3c9f72a85954afe564f7eacb
parent05e275d8742b4e1fca4a355dfc5549f7e2626605
selftests/net: in rxtimestamp getopt_long needs terminating null entry

[ Upstream commit 865a6cbb2288f8af7f9dc3b153c61b7014fdcf1e ]

getopt_long requires the last element to be filled with zeros.
Otherwise, passing an unrecognized option can cause a segfault.

Fixes: 16e781224198 ("selftests/net: Add a test to validate behavior of rx timestamps")
Signed-off-by: Tanner Love <tannerlove@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/networking/timestamping/rxtimestamp.c