-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unbreak udp_stream test (missing bind(2)); ok jakob@
- Loading branch information
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# $OpenBSD: Makefile,v 1.24 2007/09/15 21:30:26 simon Exp $ | ||
# $OpenBSD: Makefile,v 1.25 2008/09/17 12:39:17 markus Exp $ | ||
|
||
COMMENT= Network performance benchmark | ||
|
||
DISTNAME= netperf-2.3 | ||
PKGNAME= ${DISTNAME}p1 | ||
PKGNAME= ${DISTNAME}p2 | ||
CATEGORIES= benchmarks net | ||
|
||
MAINTAINER= Jakob Schlyter <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
$OpenBSD: patch-nettest_bsd_c,v 1.1 2008/09/17 12:39:17 markus Exp $ | ||
--- nettest_bsd.c.orig Wed Sep 3 20:35:56 2008 | ||
+++ nettest_bsd.c Wed Sep 3 20:36:04 2008 | ||
@@ -4885,6 +4885,24 @@ recv_udp_stream() | ||
send_response(); | ||
exit(1); | ||
} | ||
+ | ||
+ if (!udp_stream_request->ipaddress && !udp_stream_request->port) { | ||
+ struct sockaddr_in temp; | ||
+ | ||
+ bzero(&temp,sizeof(temp)); | ||
+ temp.sin_port = 0; | ||
+ temp.sin_family = AF_INET; | ||
+ temp.sin_addr.s_addr = 0; | ||
+ if (bind(s_data, | ||
+ (struct sockaddr *)&temp, | ||
+ sizeof(struct sockaddr_in)) < 0) { | ||
+ fprintf(where, | ||
+ "netperf: recv_udp_stream: data socket bind failed errno %d\n", | ||
+ errno); | ||
+ fprintf(where," port: %d\n",ntohs(temp.sin_port)); | ||
+ fflush(where); | ||
+ } | ||
+ } | ||
|
||
udp_stream_response->test_length = udp_stream_request->test_length; | ||
|