зеркало из https://github.com/mono/mail-archives.git
111 строки
4.5 KiB
HTML
111 строки
4.5 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE> [Mono-bugs] [Bug 39178][Nor] Changed - UdpClient.Connect fails with broadcast address
|
||
|
</TITLE>
|
||
|
<LINK REL="Index" HREF="index.html" >
|
||
|
<LINK REL="made" HREF="mailto:bugzilla-daemon%40rocky.ximian.com">
|
||
|
<META NAME="robots" CONTENT="index,nofollow">
|
||
|
|
||
|
<LINK REL="Previous" HREF="004185.html">
|
||
|
<LINK REL="Next" HREF="004187.html">
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#ffffff">
|
||
|
<H1>[Mono-bugs] [Bug 39178][Nor] Changed - UdpClient.Connect fails with broadcast address
|
||
|
</H1>
|
||
|
<B>bugzilla-daemon@rocky.ximian.com
|
||
|
</B>
|
||
|
<A HREF="mailto:bugzilla-daemon%40rocky.ximian.com"
|
||
|
TITLE="[Mono-bugs] [Bug 39178][Nor] Changed - UdpClient.Connect fails with broadcast address">bugzilla-daemon@rocky.ximian.com
|
||
|
</A><BR>
|
||
|
<I>Tue, 11 Mar 2003 06:46:30 -0500 (EST)</I>
|
||
|
<P><UL>
|
||
|
<LI> Previous message: <A HREF="004185.html">[Mono-bugs] [Bug 39462][Nor] New - Incorrect warning when overriding a delegate with a method.
|
||
|
</A></li>
|
||
|
<LI> Next message: <A HREF="004187.html">[Mono-bugs] [Bug 38812][Min] Changed - Array.Copy doesn't check member types.
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#4186">[ date ]</a>
|
||
|
<a href="thread.html#4186">[ thread ]</a>
|
||
|
<a href="subject.html#4186">[ subject ]</a>
|
||
|
<a href="author.html#4186">[ author ]</a>
|
||
|
</LI>
|
||
|
</UL>
|
||
|
<HR>
|
||
|
<!--beginarticle-->
|
||
|
<PRE>Please do not reply to this email- if you want to comment on the bug, go to the
|
||
|
URL shown below and enter your comments there.
|
||
|
|
||
|
Changed by <A HREF="mailto:dick@ximian.com.">dick@ximian.com.</A>
|
||
|
|
||
|
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=39178">http://bugzilla.ximian.com/show_bug.cgi?id=39178</A>
|
||
|
|
||
|
--- shadow/39178 Thu Mar 6 11:44:06 2003
|
||
|
+++ shadow/39178.tmp.6634 Tue Mar 11 06:46:30 2003
|
||
|
@@ -67,6 +67,47 @@
|
||
|
Client.SetSocketOption(SocketOptionLevel.Socket,
|
||
|
SocketOptionName.Broadcast, 1);
|
||
|
|
||
|
before calling Connect.
|
||
|
|
||
|
(Client property = the Socket (it's protected in UdpClient))
|
||
|
+
|
||
|
+------- Additional Comments From <A HREF="mailto:dick@ximian.com">dick@ximian.com</A> 2003-03-11 06:46 -------
|
||
|
+Just for reference, I thought I'd added this before but I must have
|
||
|
+forgotten to:
|
||
|
+
|
||
|
+<Dick> EINTR? sounds more like EACCES
|
||
|
+<Dick> System.Net.Sockets.SocketException: Access denied
|
||
|
+<Dick> +in (unmanaged) mono(mono_raise_exception+0x20) [0x80c14f4]
|
||
|
+<Dick> +in (unmanaged) mono
|
||
|
+<Dick> +(ves_icall_System_Net_Sockets_Socket_Connect_internal+0x7a)
|
||
|
+[0x80dbef6]
|
||
|
+<Dick> "EACCES, EPERM
|
||
|
+<Dick> The user tried to connect to a broadcast address
|
||
|
+<Dick> without having the socket broadcast flag enabled or
|
||
|
+<Dick> the connection request failed because of a local
|
||
|
+<Dick> firewall rule.
|
||
|
+<Dick> "
|
||
|
+<gonzalo> i saw a errno=4 with gdb
|
||
|
+<gonzalo> #define EINTR 4 /* Interrupted system
|
||
|
+call */
|
||
|
+<Dick> #define EACCES 13 /* Permission denied */
|
||
|
+<Dick> 321 if(ret==-1) {
|
||
|
+<Dick> (gdb) print errno
|
||
|
+<Dick> $2 = 4
|
||
|
+<Dick> (gdb) n
|
||
|
+<Dick> 322 gint errnum = errno;
|
||
|
+<Dick> (gdb)
|
||
|
+<Dick> 327 errnum = errno_to_WSA (errnum,
|
||
|
+G_GNUC_PRETTY_FUNCTION);
|
||
|
+<Dick> (gdb) s
|
||
|
+<Dick> errno_to_WSA (code=13, function_name=0x8190c73 "_wapi_connect")
|
||
|
+at error.c:62
|
||
|
+<Dick> 62 gint result = -1;
|
||
|
+<Dick> looks like some optimisation has shuffled errno assigning around
|
||
|
+<Dick> there doesnt seem to be any way of setting SO_BROADCAST from
|
||
|
+the class libraries, so i guess we need to see if we get EACCESS and
|
||
|
+try setting it there
|
||
|
+<gonzalo> btw, it works under mono/windows
|
||
|
+<Dick> yeah, its the library or the kernel denying you access for
|
||
|
+broadcast addresses
|
||
|
+
|
||
|
|
||
|
</PRE>
|
||
|
<!--endarticle-->
|
||
|
<HR>
|
||
|
<P><UL>
|
||
|
<!--threads-->
|
||
|
<LI> Previous message: <A HREF="004185.html">[Mono-bugs] [Bug 39462][Nor] New - Incorrect warning when overriding a delegate with a method.
|
||
|
</A></li>
|
||
|
<LI> Next message: <A HREF="004187.html">[Mono-bugs] [Bug 38812][Min] Changed - Array.Copy doesn't check member types.
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#4186">[ date ]</a>
|
||
|
<a href="thread.html#4186">[ thread ]</a>
|
||
|
<a href="subject.html#4186">[ subject ]</a>
|
||
|
<a href="author.html#4186">[ author ]</a>
|
||
|
</LI>
|
||
|
</UL>
|
||
|
</body></html>
|