delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/06/06:35:23

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Sat, 6 Oct 2001 21:32:30 +1100
From: "Alexandr V. Shutko" <AVShutko AT mail DOT khstu DOT ru>
X-Mailer: The Bat! (v1.48c) Personal
Reply-To: "Alexandr V.Shutko" <AVShutko AT mail DOT khstu DOT ru>
Organization: KhSTU
X-Priority: 3 (Normal)
Message-ID: <195206633413.20011006213230@mail.khstu.ru>
To: cygwin AT cygwin DOT com
Subject: BUG in sendto() function
Mime-Version: 1.0

------------3C1221FAFC0C912
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

hello cygwin,

I think there is a bug in your networking code. Sendto can't send
packet to AF_UNIX socket reporting "Addresses in the specified family
cannot be used with this socket").

Socket is creating with this code:

####################################################################################
  if ((incoming_pipe_fd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0)
  {
     LOG_SYS(0,("ERROR: Can't create unix domain socket for IPC pipe...\n"));
     exit(EXIT_ERROR_FATAL);
  }
  
  bzero((char*)&ip_serv_addr, sizeof(ip_serv_addr));
  ip_serv_addr.sun_family = AF_UNIX;
  snprintf(ip_serv_addr.sun_path, sizeof(ip_serv_addr.sun_path)-1,
           "%s/pipe_inc.%u", lp_var_path(), lp_udp_port());
           
  DEBUG(90, ("Binding pipe socket to: %s\n", ip_serv_addr.sun_path));
  
  ip_saddrlen = sizeof(ip_serv_addr.sun_family) + strlen(ip_serv_addr.sun_path)+1;

  if (unlink(ip_serv_addr.sun_path) == 0)
  {
     LOG_SYS(0, ("Init: Unix socket (incoming) exist: unclean shutdown?...\n"));
  }

  if (bind(incoming_pipe_fd, (struct sockaddr *)&ip_serv_addr, ip_saddrlen) < 0)
  {
     LOG_SYS(0, ("ERROR: Can't bind pipe socket to special file...\n"));
     exit(EXIT_ERROR_FATAL);
  }
  
  chmod(ip_serv_addr.sun_path, 0600);
}
####################################################################################

I included information about my system.
This code works fine on FreeBSD, Linux, Solaris, Irix.

-- 
With respect,
Alexandr V. Shutko                           mailto:AVShutko AT mail DOT khstu DOT ru
------------3C1221FAFC0C912
Content-Type: application/x-gzip; name="cygcheck.out.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="cygcheck.out.gz"

H4sICI3cvjsAA2N5Z2NoZWNrLm91dADtWEtz48YRvuNXTFybol22hBdJUVBtVbAkKNHmqwhI2q2F
SwGBIQkTrwJAPfaUn5JDDj7E/if5D87eUpXyIddc0oMXARCkJGxWOcSo2hUx0998Pd09092gug9L
ZxOga9M5bdFjBXVdZ2EuN74Wmq6Deqa2dNwgNPWA6m58Hzshkh+CENtIMW0sIFkL0UQPEWojlhG4
psCyiGMYlqJgRVjuCvuodcyg+ca0DMSxpy0kY//W1DGaavoacRQ11cKVgBCiN4FPW66uWfTcdCiU
PNFwYaDwoj8sDd+8xbROXw/GY4UOIvV4br/IAbCcgOnrObYpCl57pi+grqBG82o6T3ZXmIFtXPfQ
a/RHeuXamPbx0sdB4Pq0t17SA7Jl7BtHemzCBnUpSzMinck1qJH4nXQzmvQkMr5xzPsGdTEZSRVr
NihqfDl6I81uJv2b6WzSlWR5MpOJJNugYGA0VcjLq+mr8wY1nJxPxkB3FTOq6kw6n0WIBjWRueHg
zVRULshUtsvUhKobcKphWWcNqjsZyVOpWy2m28YxvscN6nddIZHovjsHIRVc1aDkd7IijXqzwZUU
z5KdycpYjHeX0yfbzM1MuhrIg8mYCDAsw8EcaCm9jTZ2DNqcHUtvpbPjN6Jydtwd9c6Or97I5D8Y
+1Ym/+DHtd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RFSa6dWUsyAe5IiH3d2j+RkWMUzvSdowD6+D2huam8lwx7aDdfMuRR6lF0lzMWCr6VBCtxx
JdBAhRUl+TbHP2KDdc39rw/uPSlv2MPlzVvPPnLct7WOVB5bUeSwAsc+pcIiy9RXoII+a/Di1Iaa
WaFR3WF+qMP9oWLXHA29DSPwreqvP0XW3778/Pbl5//4y89lgNHRCoUuCjBGK2x5SJu7mxBhTV/B
mE6sQv0HXhf5yWgnAAA=

------------3C1221FAFC0C912
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
------------3C1221FAFC0C912--


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019