unbreak ipv6 support in mono by disabling DualMode in case of AF_INET6
because IPv4 to IPv6 address mapping is disabled on OpenBSD
This commit is contained in:
parent
4af7679a5e
commit
ab59e2ba3c
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.135 2020/04/13 19:26:20 robert Exp $
|
||||
# $OpenBSD: Makefile,v 1.136 2020/04/14 14:43:21 robert Exp $
|
||||
|
||||
USE_WXNEEDED= Yes
|
||||
|
||||
COMMENT= cross platform, open source .NET developement framework
|
||||
|
||||
V= 6.8.0.105
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
|
||||
DISTNAME= mono-${V}
|
||||
|
||||
|
@ -1,8 +1,4 @@
|
||||
$OpenBSD: patch-mcs_class_System_System_Net_NetworkInformation_OpenBSDNetworkInterface_cs,v 1.2 2020/04/13 19:26:20 robert Exp $
|
||||
|
||||
AF_INET6 is defined as 24 in OpenBSD however some ports are distributed in
|
||||
a binary form and they freak out if there is a mismatch between the mono
|
||||
runtime that they were compiled with and the one that they are running with.
|
||||
$OpenBSD: patch-mcs_class_System_System_Net_NetworkInformation_OpenBSDNetworkInterface_cs,v 1.3 2020/04/14 14:43:21 robert Exp $
|
||||
|
||||
Index: mcs/class/System/System.Net.NetworkInformation/OpenBSDNetworkInterface.cs
|
||||
--- mcs/class/System/System.Net.NetworkInformation/OpenBSDNetworkInterface.cs.orig
|
||||
@ -40,7 +36,7 @@ Index: mcs/class/System/System.Net.NetworkInformation/OpenBSDNetworkInterface.cs
|
||||
+ internal class OpenBSDNetworkInterfaceAPI : MacOsNetworkInterfaceAPI
|
||||
+ {
|
||||
+ public OpenBSDNetworkInterfaceAPI ()
|
||||
+ : base (AF_INET6: 30)
|
||||
+ : base (AF_INET6: 24)
|
||||
+ {
|
||||
+ }
|
||||
+ }
|
||||
|
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-mcs_class_System_System_Net_Sockets_Socket_cs,v 1.4 2020/04/14 14:43:21 robert Exp $
|
||||
|
||||
IPv4 to IPv6 address mapping is disabled on OpenBSD, so do not
|
||||
set DualMode in mono either.
|
||||
|
||||
Index: mcs/class/System/System.Net.Sockets/Socket.cs
|
||||
--- mcs/class/System/System.Net.Sockets/Socket.cs.orig
|
||||
+++ mcs/class/System/System.Net.Sockets/Socket.cs
|
||||
@@ -148,7 +148,7 @@ namespace System.Net.Sockets
|
||||
this.DontFragment = false;
|
||||
if (protocolType == ProtocolType.Tcp)
|
||||
this.NoDelay = false;
|
||||
- } else if (addressFamily == AddressFamily.InterNetworkV6) {
|
||||
+ } else if (addressFamily == AddressFamily.InterNetworkV6 && !Platform.IsOpenBSD) {
|
||||
this.DualMode = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user