Commit 865a6cbb authored by tannerlove's avatar tannerlove Committed by David S. Miller

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: 16e78122 ("selftests/net: Add a test to validate behavior of rx timestamps")
Signed-off-by: default avatarTanner Love <tannerlove@google.com>
Acked-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 62a502cc
...@@ -115,6 +115,7 @@ static struct option long_options[] = { ...@@ -115,6 +115,7 @@ static struct option long_options[] = {
{ "tcp", no_argument, 0, 't' }, { "tcp", no_argument, 0, 't' },
{ "udp", no_argument, 0, 'u' }, { "udp", no_argument, 0, 'u' },
{ "ip", no_argument, 0, 'i' }, { "ip", no_argument, 0, 'i' },
{ NULL, 0, NULL, 0 },
}; };
static int next_port = 19999; static int next_port = 19999;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment