File tree 3 files changed +12
-1
lines changed
mcs/class/System/System.Net.Sockets
3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,9 @@ void SocketDefaults ()
147
147
this . DontFragment = false ;
148
148
if ( protocolType == ProtocolType . Tcp )
149
149
this . NoDelay = false ;
150
- } else if ( addressFamily == AddressFamily . InterNetworkV6 ) {
150
+ // The socket was created successfully; enable IPV6_V6ONLY by default for normal AF_INET6 sockets.
151
+ // This fails on raw sockets so we just let them be in default state.
152
+ } else if ( addressFamily == AddressFamily . InterNetworkV6 && socketType != SocketType . Raw ) {
151
153
this . DualMode = true ;
152
154
}
153
155
Original file line number Diff line number Diff line change @@ -378,6 +378,7 @@ convert_proto (MonoProtocolType mono_proto)
378
378
case ProtocolType_Pup :
379
379
case ProtocolType_Udp :
380
380
case ProtocolType_Idp :
381
+ case ProtocolType_IcmpV6 :
381
382
/* These protocols are known (on my system at least) */
382
383
return mono_proto ;
383
384
case ProtocolType_ND :
Original file line number Diff line number Diff line change @@ -78,11 +78,19 @@ typedef enum {
78
78
ProtocolType_Icmp = 1 ,
79
79
ProtocolType_Igmp = 2 ,
80
80
ProtocolType_Ggp = 3 ,
81
+ ProtocolType_IPv4 = 4 ,
81
82
ProtocolType_Tcp = 6 ,
82
83
ProtocolType_Pup = 12 ,
83
84
ProtocolType_Udp = 17 ,
84
85
ProtocolType_Idp = 22 ,
85
86
ProtocolType_IPv6 = 41 ,
87
+ ProtocolType_IPv6RoutingHeader = 43 ,
88
+ ProtocolType_IPv6FragmentHeader = 44 ,
89
+ ProtocolType_IPSecEncapsulatingSecurityPayload = 50 ,
90
+ ProtocolType_IPSecAuthenticationHeader = 51 ,
91
+ ProtocolType_IcmpV6 = 58 ,
92
+ ProtocolType_IPv6NoNextHeader = 59 ,
93
+ ProtocolType_IPv6DestinationOptions = 60 ,
86
94
ProtocolType_ND = 77 ,
87
95
ProtocolType_Raw = 255 ,
88
96
ProtocolType_Unspecified = 0 ,
You can’t perform that action at this time.
0 commit comments