Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for bug 9250 (critical bug for embedded mono) #600

Merged
merged 1 commit into from Jul 21, 2013
Merged

Fix for bug 9250 (critical bug for embedded mono) #600

merged 1 commit into from Jul 21, 2013

Conversation

tr8dr
Copy link
Contributor

@tr8dr tr8dr commented Mar 16, 2013

System.Net.Sockets/Socket_2_1 had a bug introduced in 3.0.3+. The static constructor determines whether the socket / system can support ipv6. In the process uses ConfigurationManager to check application properties related to network settings.

ConfiguratationManager will always produce a ConfigurationErrorsException exception when used in the context of an application embedding mono, as there is no application configuration in this context.

This bug has preventing me from being able to upgrade from 3.0.2 for 3 months, so appreciate if can be integrated soon.

The solution is then to guard against this exception in the configuration tests and fall through to the alternative test for ipv6 functionality. The change is just try / catch + comments, nothing more.

I did not add a unit test for this as there is no way to demonstrate the problem through a C# unit test, short of creating an embedded application that attempts to create a Socket or use one of the network related facilities.

Needless to say the change does not affect the normal behavior of Socket initialization in the context of a mono exe AND also provides correct behavior for embedded applications.

- socket configuration attempts to determine if system supports ipv6
- checks app configuration, but configuration throws exception if called from embedded context
- solution is to put a try/catch guard and fall to an alternative test for ipv6
@alexrp
Copy link
Contributor

alexrp commented Jul 21, 2013

@grendello is this something you would be comfortable with reviewing?

@kumpera
Copy link
Contributor

kumpera commented Jul 21, 2013

LGTM.

kumpera added a commit that referenced this pull request Jul 21, 2013
Fix for bug 9250 (critical bug for embedded mono)
@kumpera kumpera merged commit 89d5527 into mono:master Jul 21, 2013
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Fix for bug 9250 (critical bug for embedded mono)

Commit migrated from mono/mono@89d5527
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants