svn commit: r345597 - stable/12/contrib/ofed/librdmacm/examples
Navdeep Parhar
np at FreeBSD.org
Wed Mar 27 19:40:33 UTC 2019
Author: np
Date: Wed Mar 27 19:40:31 2019
New Revision: 345597
URL: https://svnweb.freebsd.org/changeset/base/345597
Log:
MFC r339886:
rping(1): Make sure the socket address defaults to something reasonable
when running as the server.
Submitted by: Krishnamraju Eraparaju @ Chelsio
Reviewed by: hselasky@, np@
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D17707
Modified:
stable/12/contrib/ofed/librdmacm/examples/rping.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/contrib/ofed/librdmacm/examples/rping.c
==============================================================================
--- stable/12/contrib/ofed/librdmacm/examples/rping.c Wed Mar 27 19:40:18 2019 (r345596)
+++ stable/12/contrib/ofed/librdmacm/examples/rping.c Wed Mar 27 19:40:31 2019 (r345597)
@@ -1177,9 +1177,13 @@ int main(int argc, char *argv[])
cb->server = -1;
cb->state = IDLE;
cb->size = 64;
- cb->sin.ss_family = PF_INET;
cb->port = htobe16(7174);
sem_init(&cb->sem, 0, 0);
+
+ /* initialize sockaddr structure with defaults */
+ ret = get_addr("0.0.0.0", (struct sockaddr *) &cb->sin);
+ if (ret)
+ goto out;
opterr = 0;
while ((op=getopt(argc, argv, "a:I:Pp:C:S:t:scvVd")) != -1) {
More information about the svn-src-all
mailing list