diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2017-02-02 14:56:45 +0200 |
---|---|---|
committer | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2017-02-03 15:59:20 +0200 |
commit | 1ec6038c4883e07087927d4dda9c328cbaf7295d (patch) | |
tree | 10a590c0c08da480c53f2db5be0428d39c51009d /samples | |
parent | 1301d3f6d3a80e47ca4c9b64a008145d4bd99405 (diff) |
samples: net: zperf: Initialize address family properly
The IP address family was not set correctly when setting up
the connection. This lead to connectivity error in udp.upload
command.
Change-Id: I598ff2675f97e10e2033763a497f7583c94f3840
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Diffstat (limited to 'samples')
-rw-r--r-- | samples/net/zperf/src/zperf_shell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/net/zperf/src/zperf_shell.c b/samples/net/zperf/src/zperf_shell.c index d3c302dec..f80717fe9 100644 --- a/samples/net/zperf/src/zperf_shell.c +++ b/samples/net/zperf/src/zperf_shell.c @@ -682,11 +682,11 @@ out: static int shell_cmd_upload(int argc, char *argv[]) { + struct sockaddr_in6 ipv6 = { .sin6_family = AF_INET6 }; + struct sockaddr_in ipv4 = { .sin_family = AF_INET }; struct net_context *context6 = NULL, *context4 = NULL; sa_family_t family = AF_UNSPEC; unsigned int duration_in_ms, packet_size, rate_in_kbps; - struct sockaddr_in6 ipv6; - struct sockaddr_in ipv4; uint16_t port; bool is_udp; int start = 0; |