Skip to content

Commit

Permalink
Fix for Mono IPv6 properties breakage.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsseisums committed Jul 24, 2015
1 parent 3d7d9b6 commit 3e7c40b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Tmds/MDns/NetworkInterfaceHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,17 @@ private void OnReceive(IAsyncResult ar)
{
continue;
}
address.ScopeId = NetworkInterface.Information.GetIPProperties().GetIPv6Properties().Index;

// Mono does not support IPv6 properties and always throws NotImplementedException.
// Lets handle the case as with Supports.
try
{
address.ScopeId = NetworkInterface.Information.GetIPProperties().GetIPv6Properties().Index;
}
catch (NotImplementedException)
{
continue;
}
}
OnARecord(recordHeader.Name, address, recordHeader.Ttl);
}
Expand Down

0 comments on commit 3e7c40b

Please sign in to comment.