selftests/net: udpgso_bench_rx: fix port argument
authorWillem de Bruijn <willemb@google.com>
Thu, 11 Nov 2021 11:57:17 +0000 (06:57 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 13:04:28 +0000 (14:04 +0100)
commitee79560cb768ef56d91452868d01888e97373ccb
treea31df65452650181822fbf54eee8bf6aeaa44b5f
parent8b215edb7a38c4fdf78ef94a0704694c59e6f8d4
selftests/net: udpgso_bench_rx: fix port argument

[ Upstream commit d336509cb9d03970911878bb77f0497f64fda061 ]

The below commit added optional support for passing a bind address.
It configures the sockaddr bind arguments before parsing options and
reconfigures on options -b and -4.

This broke support for passing port (-p) on its own.

Configure sockaddr after parsing all arguments.

Fixes: 3327a9c46352 ("selftests: add functionals test for UDP GRO")
Reported-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/udpgso_bench_rx.c