Skip to content

Commit

Permalink
Merge pull request #4 from joltmode/master
Browse files Browse the repository at this point in the history
Fix for Mono IPv6 properties breakage.
  • Loading branch information
tmds committed Jul 24, 2015
2 parents 3d7d9b6 + 3e7c40b commit 4b8a7bf
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 4b8a7bf

Please sign in to comment.