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>
This commit is contained in:
Jukka Rissanen 2017-02-02 14:56:45 +02:00
commit 1ec6038c48

View file

@ -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;