1. 25 6月, 2014 1 次提交
  2. 24 5月, 2014 3 次提交
  3. 23 5月, 2014 1 次提交
  4. 12 5月, 2014 1 次提交
  5. 16 4月, 2014 1 次提交
  6. 01 4月, 2014 1 次提交
  7. 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
  8. 14 3月, 2014 1 次提交
  9. 04 3月, 2014 1 次提交
  10. 19 2月, 2014 2 次提交
  11. 12 2月, 2014 1 次提交
  12. 23 1月, 2014 2 次提交
  13. 22 1月, 2014 3 次提交
  14. 21 1月, 2014 2 次提交
  15. 03 1月, 2014 1 次提交
  16. 12 12月, 2013 1 次提交
  17. 07 12月, 2013 1 次提交
  18. 27 11月, 2013 2 次提交
  19. 21 11月, 2013 1 次提交
  20. 19 11月, 2013 2 次提交
  21. 06 11月, 2013 2 次提交
  22. 01 11月, 2013 5 次提交
  23. 28 10月, 2013 1 次提交
  24. 25 10月, 2013 1 次提交
  25. 23 10月, 2013 2 次提交