Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Apr 2010 23:21:24 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r206689 - head/contrib/netcat
Message-ID:  <201004152321.o3FNLOW4047975@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Thu Apr 15 23:21:24 2010
New Revision: 206689
URL: http://svn.freebsd.org/changeset/base/206689

Log:
  Utilize IP_BINDANY which provided the same semantics of OpenBSD's
  SO_BINDANY.

Modified:
  head/contrib/netcat/netcat.c

Modified: head/contrib/netcat/netcat.c
==============================================================================
--- head/contrib/netcat/netcat.c	Thu Apr 15 22:57:30 2010	(r206688)
+++ head/contrib/netcat/netcat.c	Thu Apr 15 23:21:24 2010	(r206689)
@@ -570,10 +570,8 @@ remote_connect(const char *host, const c
 		if (sflag || pflag) {
 			struct addrinfo ahints, *ares;
 
-#ifdef SO_BINDANY
-			/* try SO_BINDANY, but don't insist */
-			setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on));
-#endif
+			/* try IP_BINDANY, but don't insist */
+			setsockopt(s, IPPROTO_IP, IP_BINDANY, &on, sizeof(on));
 			memset(&ahints, 0, sizeof(struct addrinfo));
 			ahints.ai_family = res0->ai_family;
 			ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004152321.o3FNLOW4047975>