selftests/net: in rxtimestamp getopt_long needs terminating null entry

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

Fixes: 16e7812241 ("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>
This commit is contained in:
tannerlove 2020-06-09 17:21:32 -04:00 committed by David S. Miller
parent 62a502cc91
commit 865a6cbb22
1 changed files with 1 additions and 0 deletions

View File

@ -115,6 +115,7 @@ static struct option long_options[] = {
{ "tcp", no_argument, 0, 't' },
{ "udp", no_argument, 0, 'u' },
{ "ip", no_argument, 0, 'i' },
{ NULL, 0, NULL, 0 },
};
static int next_port = 19999;