{"action":"created","issue":{"url":"https://api.github.com/repos/nanomsg/nanomsg/issues/355","labels_url":"https://api.github.com/repos/nanomsg/nanomsg/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/nanomsg/nanomsg/issues/355/comments","events_url":"https://api.github.com/repos/nanomsg/nanomsg/issues/355/events","html_url":"https://github.com/nanomsg/nanomsg/issues/355","id":52871048,"number":355,"title":"Bind a PUB socket providing only an interface name produce an assert failure.","user":{"login":"vbmithr","id":797581,"avatar_url":"https://avatars.githubusercontent.com/u/797581?v=3","gravatar_id":"","url":"https://api.github.com/users/vbmithr","html_url":"https://github.com/vbmithr","followers_url":"https://api.github.com/users/vbmithr/followers","following_url":"https://api.github.com/users/vbmithr/following{/other_user}","gists_url":"https://api.github.com/users/vbmithr/gists{/gist_id}","starred_url":"https://api.github.com/users/vbmithr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbmithr/subscriptions","organizations_url":"https://api.github.com/users/vbmithr/orgs","repos_url":"https://api.github.com/users/vbmithr/repos","events_url":"https://api.github.com/users/vbmithr/events{/privacy}","received_events_url":"https://api.github.com/users/vbmithr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-12-25T19:52:02Z","updated_at":"2015-05-31T21:21:22Z","closed_at":"2015-05-31T21:21:22Z","body":"This program\r\n\r\n```c\r\n#include <stdlib.h>\r\n#include <assert.h>\r\n#include <nanomsg/nn.h>\r\n#include <nanomsg/pubsub.h>\r\n\r\nint main(int argc, char** argv)\r\n{\r\n  int s = nn_socket(AF_SP, NN_PUB);\r\n  assert (s >= 0);\r\n  int eid = nn_bind(s, \"tcp://eth0:46555\");\r\n  assert (eid >= 0);\r\n\r\n  return(EXIT_SUCCESS);\r\n}\r\n```\r\n\r\ncrashes with\r\n\r\n```shell\r\n[vb@haramis /tmp]% ./a.out                                                                                                         \r\nAssertion failed: !ipv6 (src/transports/utils/iface.c:88)\r\nzsh: abort (core dumped)  ./a.out\r\n```\r\nIt probably should not."},"comment":{"url":"https://api.github.com/repos/nanomsg/nanomsg/issues/comments/107247758","html_url":"https://github.com/nanomsg/nanomsg/issues/355#issuecomment-107247758","issue_url":"https://api.github.com/repos/nanomsg/nanomsg/issues/355","id":107247758,"user":{"login":"gdamore","id":1295229,"avatar_url":"https://avatars.githubusercontent.com/u/1295229?v=3","gravatar_id":"","url":"https://api.github.com/users/gdamore","html_url":"https://github.com/gdamore","followers_url":"https://api.github.com/users/gdamore/followers","following_url":"https://api.github.com/users/gdamore/following{/other_user}","gists_url":"https://api.github.com/users/gdamore/gists{/gist_id}","starred_url":"https://api.github.com/users/gdamore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdamore/subscriptions","organizations_url":"https://api.github.com/users/gdamore/orgs","repos_url":"https://api.github.com/users/gdamore/repos","events_url":"https://api.github.com/users/gdamore/events{/privacy}","received_events_url":"https://api.github.com/users/gdamore/received_events","type":"User","site_admin":false},"created_at":"2015-05-31T21:21:21Z","updated_at":"2015-05-31T21:21:21Z","body":"This is a dup of #371 (or vice versa).  Fixed.\r\n\r\nThat said, pay close attention.  The code will bind to the first unicast address it finds on the interface.  That may or may not be what you want.  It may be better to administratively force and IP address directly instead of using an interface name."}}