{"action":"created","issue":{"url":"https://api.github.com/repos/raspberrypi/scratch/issues/147","labels_url":"https://api.github.com/repos/raspberrypi/scratch/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/raspberrypi/scratch/issues/147/comments","events_url":"https://api.github.com/repos/raspberrypi/scratch/issues/147/events","html_url":"https://github.com/raspberrypi/scratch/issues/147","id":106823597,"number":147,"title":"scratch-15092015, getip wrong result","user":{"login":"heppg","id":5240331,"avatar_url":"https://avatars.githubusercontent.com/u/5240331?v=3","gravatar_id":"","url":"https://api.github.com/users/heppg","html_url":"https://github.com/heppg","followers_url":"https://api.github.com/users/heppg/followers","following_url":"https://api.github.com/users/heppg/following{/other_user}","gists_url":"https://api.github.com/users/heppg/gists{/gist_id}","starred_url":"https://api.github.com/users/heppg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heppg/subscriptions","organizations_url":"https://api.github.com/users/heppg/orgs","repos_url":"https://api.github.com/users/heppg/repos","events_url":"https://api.github.com/users/heppg/events{/privacy}","received_events_url":"https://api.github.com/users/heppg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/raspberrypi/scratch/labels/bug","name":"bug","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"spl237","id":10401149,"avatar_url":"https://avatars.githubusercontent.com/u/10401149?v=3","gravatar_id":"","url":"https://api.github.com/users/spl237","html_url":"https://github.com/spl237","followers_url":"https://api.github.com/users/spl237/followers","following_url":"https://api.github.com/users/spl237/following{/other_user}","gists_url":"https://api.github.com/users/spl237/gists{/gist_id}","starred_url":"https://api.github.com/users/spl237/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spl237/subscriptions","organizations_url":"https://api.github.com/users/spl237/orgs","repos_url":"https://api.github.com/users/spl237/repos","events_url":"https://api.github.com/users/spl237/events{/privacy}","received_events_url":"https://api.github.com/users/spl237/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-09-16T17:44:16Z","updated_at":"2015-09-18T17:29:38Z","closed_at":null,"body":"My local raspberry has ip 192.168.2.108 (ifconfig, and can ping that from other computers with this address)\r\nResult of getip is 127.0.1.1, which is not what I expect.\r\n\r\neth-0-connection, no wireless."},"comment":{"url":"https://api.github.com/repos/raspberrypi/scratch/issues/comments/141514153","html_url":"https://github.com/raspberrypi/scratch/issues/147#issuecomment-141514153","issue_url":"https://api.github.com/repos/raspberrypi/scratch/issues/147","id":141514153,"user":{"login":"timrowledge","id":7818030,"avatar_url":"https://avatars.githubusercontent.com/u/7818030?v=3","gravatar_id":"","url":"https://api.github.com/users/timrowledge","html_url":"https://github.com/timrowledge","followers_url":"https://api.github.com/users/timrowledge/followers","following_url":"https://api.github.com/users/timrowledge/following{/other_user}","gists_url":"https://api.github.com/users/timrowledge/gists{/gist_id}","starred_url":"https://api.github.com/users/timrowledge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timrowledge/subscriptions","organizations_url":"https://api.github.com/users/timrowledge/orgs","repos_url":"https://api.github.com/users/timrowledge/repos","events_url":"https://api.github.com/users/timrowledge/events{/privacy}","received_events_url":"https://api.github.com/users/timrowledge/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T17:29:38Z","updated_at":"2015-09-18T17:29:38Z","body":"The intent of the getIP thing is to give the user an address they can enter on another scratch system so as to join the mesh network. So I guess it has to be a 'good' IP number for the hosting device, whatever that might mean. 127.0.1.1 is pretty much never going to be a useful answer for this.\r\n\r\nIt's not a specifically Scratch thing, nor even new code; I think the C code implementing the lowest levels in the VM has been stable for maybe ten years now (also known as 'nobody has bothered to improve anything in ages') because it does what seems right on other machines & unixes. I'm puzzled as to why any OS would answer the 127 value when there are clearly better results any time there is any sort of network connection. \r\n\r\nThere must surely be a standard api for this? I mean, it's got to be a really common requirement"}}