aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2005-01-16 15:01:28 +0000
committerRobert Watson <rwatson@FreeBSD.org>2005-01-16 15:01:28 +0000
commit2d7142bf0d3cccc74a0fc8479fa63c795d0d0556 (patch)
tree7864f21f05e73dce050c9d14ce62115ad46461f6
parente3ec673e977fa2a6124ad230de63df3cc7becc16 (diff)
downloadsrc-2d7142bf0d3cccc74a0fc8479fa63c795d0d0556.tar.gz
src-2d7142bf0d3cccc74a0fc8479fa63c795d0d0556.zip
In refactoring the test before committing, a pointer was passed instead
of a structure for the sockaddr_in. Pass the pointer to connect() instead of the pointer to the pointer. Specify a port number to connect to.
Notes
Notes: svn path=/head/; revision=140352
-rw-r--r--tools/regression/netinet/udpconnectjail/udpconnectjail.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/regression/netinet/udpconnectjail/udpconnectjail.c b/tools/regression/netinet/udpconnectjail/udpconnectjail.c
index be7e43b22608..0c3299f01d6b 100644
--- a/tools/regression/netinet/udpconnectjail/udpconnectjail.c
+++ b/tools/regression/netinet/udpconnectjail/udpconnectjail.c
@@ -64,7 +64,7 @@ test(const char *context, struct sockaddr_in *sin)
errx(-1, "%s: socket(PF_INET, SOCK_DGRAM, 0): %s", context,
strerror(errno));
- if (connect(sock, (struct sockaddr *)&sin, sizeof(sin)) < 0)
+ if (connect(sock, (struct sockaddr *)sin, sizeof(*sin)) < 0)
errx(-1, "%s: connect(%s): %s", context,
inet_ntoa(sin->sin_addr), strerror(errno));
@@ -85,7 +85,7 @@ main(int argc, __unused char *argv[])
sin.sin_len = sizeof(sin);
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
- sin.sin_port = 0;
+ sin.sin_port = htons(8080); /* Arbitrary */
/*
* First run the system call test outside of a jail.