1. 19 7月, 2014 5 次提交
  2. 10 7月, 2014 1 次提交
  3. 09 7月, 2014 1 次提交
  4. 02 7月, 2014 1 次提交
  5. 25 6月, 2014 2 次提交
  6. 23 6月, 2014 1 次提交
  7. 19 6月, 2014 1 次提交
  8. 12 6月, 2014 8 次提交
  9. 24 5月, 2014 3 次提交
  10. 23 5月, 2014 1 次提交
  11. 12 5月, 2014 1 次提交
  12. 16 4月, 2014 1 次提交
  13. 01 4月, 2014 1 次提交
  14. 26 3月, 2014 1 次提交
    • J
      [System] Fix MacOsNetworkInterface.ImplGetAllNetworkInterfaces() · 86a05fe8
      Jonathan Pryor 提交于
      On my (cursed?) MacBook Pro, calling
      System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
      results in an exception:
      
      	System.ArgumentException: length
      		at System.Array.Copy (System.Array sourceArray, Int32 sourceIndex, System.Array destinationArray, Int32 destinationIndex, Int32 length) [0x00000] in <filename unknown>:0
      		at System.Net.NetworkInformation.MacOsNetworkInterface.ImplGetAllNetworkInterfaces () [0x00000] in <filename unknown>:0
      		at System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces () [0x00000] in <filename unknown>:0
      
      Some printfs later, and we see why:
      
      	Array.Copy(array.Length=12, 3, array.Length=0, 0, 0)
      	Array.Copy(array.Length=12, 4, array.Length=0, 0, 0)
      	Array.Copy(array.Length=12, 4, array.Length=0, 0, 0)
      	Array.Copy(array.Length=12, 3, array.Length=6, 0, 6)
      	Array.Copy(array.Length=12, 3, array.Length=6, 0, 6)
      	Array.Copy(array.Length=12, 3, array.Length=8, 0, 4)
      	Array.Copy(array.Length=12, 4, array.Length=6, 0, 6)
      	Array.Copy(array.Length=12, 8, array.Length=6, 0, 6)
      	# BOOM!
      
      (Apparently I have 8 interfaces: lo0, gif0, stf0, en0, en1, fw0, p2p0,
      and vboxnet0.)
      
      The problem is readily obvious: we're trying to read 6 bytes of data
      when only 4 are available, and Array.Copy() complains appropriately.
      
      The fix -- which looks to almost contradict a02076ba -- is to use
      `sockaddrdl.sdl_data.Length - sockaddrdl.sdl_nlen` instead of
      `sockaddrdl.sdl_data.Length - macAddress.Length` (or sdl_alen).
      sdl_nlen is the offset into the source sockaddrdl.sdl_data array, and
      in this case sockaddrdl.sdl_alen (the length of the destination
      macAddress) isn't the same as sockaddrdl.sdl_nlen, hence the breakage.
      
      Conflicts:
      	mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
      86a05fe8
  15. 14 3月, 2014 1 次提交
  16. 04 3月, 2014 1 次提交
  17. 19 2月, 2014 2 次提交
  18. 12 2月, 2014 1 次提交
  19. 23 1月, 2014 2 次提交
  20. 22 1月, 2014 3 次提交
  21. 21 1月, 2014 2 次提交