{"action":"created","issue":{"url":"https://api.github.com/repos/svinota/pyroute2/issues/423","repository_url":"https://api.github.com/repos/svinota/pyroute2","labels_url":"https://api.github.com/repos/svinota/pyroute2/issues/423/labels{/name}","comments_url":"https://api.github.com/repos/svinota/pyroute2/issues/423/comments","events_url":"https://api.github.com/repos/svinota/pyroute2/issues/423/events","html_url":"https://github.com/svinota/pyroute2/pull/423","id":258182046,"number":423,"title":"Ipset port fixes","user":{"login":"AZaugg","id":825042,"avatar_url":"https://avatars3.githubusercontent.com/u/825042?v=4","gravatar_id":"","url":"https://api.github.com/users/AZaugg","html_url":"https://github.com/AZaugg","followers_url":"https://api.github.com/users/AZaugg/followers","following_url":"https://api.github.com/users/AZaugg/following{/other_user}","gists_url":"https://api.github.com/users/AZaugg/gists{/gist_id}","starred_url":"https://api.github.com/users/AZaugg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AZaugg/subscriptions","organizations_url":"https://api.github.com/users/AZaugg/orgs","repos_url":"https://api.github.com/users/AZaugg/repos","events_url":"https://api.github.com/users/AZaugg/events{/privacy}","received_events_url":"https://api.github.com/users/AZaugg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-15T22:40:20Z","updated_at":"2017-09-19T07:37:55Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/svinota/pyroute2/pulls/423","html_url":"https://github.com/svinota/pyroute2/pull/423","diff_url":"https://github.com/svinota/pyroute2/pull/423.diff","patch_url":"https://github.com/svinota/pyroute2/pull/423.patch"},"body":"A few additional changes needed:\r\n\r\n - When setting hash:ports we must set a protocol with it, we must never specify a protocol when setting a bitmap:port\r\n - entry could be a string when setting an individual port. casting to int, in the event PortEntry is not used."},"comment":{"url":"https://api.github.com/repos/svinota/pyroute2/issues/comments/330456002","html_url":"https://github.com/svinota/pyroute2/pull/423#issuecomment-330456002","issue_url":"https://api.github.com/repos/svinota/pyroute2/issues/423","id":330456002,"user":{"login":"ffourcot","id":17849937,"avatar_url":"https://avatars2.githubusercontent.com/u/17849937?v=4","gravatar_id":"","url":"https://api.github.com/users/ffourcot","html_url":"https://github.com/ffourcot","followers_url":"https://api.github.com/users/ffourcot/followers","following_url":"https://api.github.com/users/ffourcot/following{/other_user}","gists_url":"https://api.github.com/users/ffourcot/gists{/gist_id}","starred_url":"https://api.github.com/users/ffourcot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffourcot/subscriptions","organizations_url":"https://api.github.com/users/ffourcot/orgs","repos_url":"https://api.github.com/users/ffourcot/repos","events_url":"https://api.github.com/users/ffourcot/events{/privacy}","received_events_url":"https://api.github.com/users/ffourcot/received_events","type":"User","site_admin":false},"created_at":"2017-09-19T07:37:55Z","updated_at":"2017-09-19T07:37:55Z","author_association":"COLLABORATOR","body":"@AZaugg : did you really need this feature or can we close this pull request? I think that it's a bad idea to merge it because:\r\n\r\n- the cast to int probably does not hurt, but could be done by the caller. I don't have a strong opinion on it, but i don't see the benefit today\r\n- your code to provide a default value for \"hash:net,port and friends\" looks like a hack. Your check on etype variable to provide a default value is working since only bitmap:port don't need today a protocol (and refuse if any is set), and it's the only type with port as single dimension. But if a new \"foo:port\" type is added in kernels, your code will be broken."}}
{"actor":{"display_login":"ffourcot"}}