{"action":"created","comment":{"url":"https://api.github.com/repos/opnsense/core/pulls/comments/115929879","pull_request_review_id":37509655,"id":115929879,"diff_hunk":"@@ -0,0 +1,36 @@\n+#!/usr/local/bin/php\n+<?php\n+\n+// Use legacy code to get bind address\n+\n+// TODO: make address detection in MVC code and remove this script\n+\n+require_once(\"config.inc\");\n+require_once(\"util.inc\");\n+require_once(\"services.inc\");\n+require_once(\"interfaces.inc\");\n+\n+if($argc < 2)\n+    return;\n+\n+$source = $argv[1];\n+$proto = isset($argv[2]) ? $argv[2] : \"ipv4\";\n+\n+if (!empty($source)) {\n+    if ($proto == \"ipv6\") {\n+        $ifaddr = is_ipaddr($source) ? $source : get_interface_ipv6($source);\n+        if (!is_ipaddr($ifaddr)) {\n+            $ifaddr = get_interface_ip($source);\n+        }\n+    } else {\n+        $ifaddr = is_ipaddr($source) ? $source : get_interface_ip($source);\n+        if (!is_ipaddr($ifaddr)) {\n+            $ifaddr = get_interface_ipv6($source);\n+        }\n+    }\n+    if (is_ipaddr($ifaddr)) {\n+        echo $ifaddr;\n+    }\n+}\n+\n+return;","path":"src/opnsense/scripts/OPNsense/Syslog/get_bind_address.php","position":36,"original_position":36,"commit_id":"ae3022645cdd4f045b648ff9eec2d78b7af1f4c1","original_commit_id":"5b020e30a82f8593aafd1807bfbc8c15534ce9e6","user":{"login":"evbevz","id":8384497,"avatar_url":"https://avatars3.githubusercontent.com/u/8384497?v=3","gravatar_id":"","url":"https://api.github.com/users/evbevz","html_url":"https://github.com/evbevz","followers_url":"https://api.github.com/users/evbevz/followers","following_url":"https://api.github.com/users/evbevz/following{/other_user}","gists_url":"https://api.github.com/users/evbevz/gists{/gist_id}","starred_url":"https://api.github.com/users/evbevz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evbevz/subscriptions","organizations_url":"https://api.github.com/users/evbevz/orgs","repos_url":"https://api.github.com/users/evbevz/repos","events_url":"https://api.github.com/users/evbevz/events{/privacy}","received_events_url":"https://api.github.com/users/evbevz/received_events","type":"User","site_admin":false},"body":"done","created_at":"2017-05-11T08:19:08Z","updated_at":"2017-05-11T08:19:08Z","html_url":"https://github.com/opnsense/core/pull/1613#discussion_r115929879","pull_request_url":"https://api.github.com/repos/opnsense/core/pulls/1613","_links":{"self":{"href":"https://api.github.com/repos/opnsense/core/pulls/comments/115929879"},"html":{"href":"https://github.com/opnsense/core/pull/1613#discussion_r115929879"},"pull_request":{"href":"https://api.github.com/repos/opnsense/core/pulls/1613"}}},"pull_request":{"url":"https://api.github.com/repos/opnsense/core/pulls/1613","id":119056346,"html_url":"https://github.com/opnsense/core/pull/1613","diff_url":"https://github.com/opnsense/core/pull/1613.diff","patch_url":"https://github.com/opnsense/core/pull/1613.patch","issue_url":"https://api.github.com/repos/opnsense/core/issues/1613","number":1613,"state":"open","locked":false,"title":"Move syslog to MVC (another way)","user":{"login":"evbevz","id":8384497,"avatar_url":"https://avatars3.githubusercontent.com/u/8384497?v=3","gravatar_id":"","url":"https://api.github.com/users/evbevz","html_url":"https://github.com/evbevz","followers_url":"https://api.github.com/users/evbevz/followers","following_url":"https://api.github.com/users/evbevz/following{/other_user}","gists_url":"https://api.github.com/users/evbevz/gists{/gist_id}","starred_url":"https://api.github.com/users/evbevz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evbevz/subscriptions","organizations_url":"https://api.github.com/users/evbevz/orgs","repos_url":"https://api.github.com/users/evbevz/repos","events_url":"https://api.github.com/users/evbevz/events{/privacy}","received_events_url":"https://api.github.com/users/evbevz/received_events","type":"User","site_admin":false},"body":"Step 1: move syslog settings to MVC\r\n- do not remove circular logs\r\n- leave patched port opnsense/syslog as is\r\n- do not touch plugins logging implementation\r\n- make syslog model in MVC\r\n- modify system.inc to pull MVC methods\r\n- make migration class to move current logging settings to MVC\r\n- move legacy-coded services logging settings to plugins.inc.d subsystem (dhcpd local socket)\r\n- add newsyslog for non-curcular logs logrotation\r\n- add logview controller for any log representation (now only system.log view uses it)\r\n\r\nNext steps can be:\r\n- move other log views to use logview controller and remove /www/diag_logs_...php files\r\n- remove circular logs\r\n- switch to syslog_ng","created_at":"2017-05-04T20:10:28Z","updated_at":"2017-05-11T08:19:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3639932f50cdd92f653506038da8f5f50f6a2186","assignee":{"login":"AdSchellevis","id":9783985,"avatar_url":"https://avatars1.githubusercontent.com/u/9783985?v=3","gravatar_id":"","url":"https://api.github.com/users/AdSchellevis","html_url":"https://github.com/AdSchellevis","followers_url":"https://api.github.com/users/AdSchellevis/followers","following_url":"https://api.github.com/users/AdSchellevis/following{/other_user}","gists_url":"https://api.github.com/users/AdSchellevis/gists{/gist_id}","starred_url":"https://api.github.com/users/AdSchellevis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdSchellevis/subscriptions","organizations_url":"https://api.github.com/users/AdSchellevis/orgs","repos_url":"https://api.github.com/users/AdSchellevis/repos","events_url":"https://api.github.com/users/AdSchellevis/events{/privacy}","received_events_url":"https://api.github.com/users/AdSchellevis/received_events","type":"User","site_admin":false},"assignees":[{"login":"AdSchellevis","id":9783985,"avatar_url":"https://avatars1.githubusercontent.com/u/9783985?v=3","gravatar_id":"","url":"https://api.github.com/users/AdSchellevis","html_url":"https://github.com/AdSchellevis","followers_url":"https://api.github.com/users/AdSchellevis/followers","following_url":"https://api.github.com/users/AdSchellevis/following{/other_user}","gists_url":"https://api.github.com/users/AdSchellevis/gists{/gist_id}","starred_url":"https://api.github.com/users/AdSchellevis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdSchellevis/subscriptions","organizations_url":"https://api.github.com/users/AdSchellevis/orgs","repos_url":"https://api.github.com/users/AdSchellevis/repos","events_url":"https://api.github.com/users/AdSchellevis/events{/privacy}","received_events_url":"https://api.github.com/users/AdSchellevis/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/opnsense/core/pulls/1613/commits","review_comments_url":"https://api.github.com/repos/opnsense/core/pulls/1613/comments","review_comment_url":"https://api.github.com/repos/opnsense/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opnsense/core/issues/1613/comments","statuses_url":"https://api.github.com/repos/opnsense/core/statuses/ae3022645cdd4f045b648ff9eec2d78b7af1f4c1","head":{"label":"evbevz:syslog_mvc","ref":"syslog_mvc","sha":"ae3022645cdd4f045b648ff9eec2d78b7af1f4c1","user":{"login":"evbevz","id":8384497,"avatar_url":"https://avatars3.githubusercontent.com/u/8384497?v=3","gravatar_id":"","url":"https://api.github.com/users/evbevz","html_url":"https://github.com/evbevz","followers_url":"https://api.github.com/users/evbevz/followers","following_url":"https://api.github.com/users/evbevz/following{/other_user}","gists_url":"https://api.github.com/users/evbevz/gists{/gist_id}","starred_url":"https://api.github.com/users/evbevz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evbevz/subscriptions","organizations_url":"https://api.github.com/users/evbevz/orgs","repos_url":"https://api.github.com/users/evbevz/repos","events_url":"https://api.github.com/users/evbevz/events{/privacy}","received_events_url":"https://api.github.com/users/evbevz/received_events","type":"User","site_admin":false},"repo":{"id":52340828,"name":"core","full_name":"evbevz/core","owner":{"login":"evbevz","id":8384497,"avatar_url":"https://avatars3.githubusercontent.com/u/8384497?v=3","gravatar_id":"","url":"https://api.github.com/users/evbevz","html_url":"https://github.com/evbevz","followers_url":"https://api.github.com/users/evbevz/followers","following_url":"https://api.github.com/users/evbevz/following{/other_user}","gists_url":"https://api.github.com/users/evbevz/gists{/gist_id}","starred_url":"https://api.github.com/users/evbevz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evbevz/subscriptions","organizations_url":"https://api.github.com/users/evbevz/orgs","repos_url":"https://api.github.com/users/evbevz/repos","events_url":"https://api.github.com/users/evbevz/events{/privacy}","received_events_url":"https://api.github.com/users/evbevz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evbevz/core","description":"OPNsense GUI, API and systems backend","fork":true,"url":"https://api.github.com/repos/evbevz/core","forks_url":"https://api.github.com/repos/evbevz/core/forks","keys_url":"https://api.github.com/repos/evbevz/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evbevz/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evbevz/core/teams","hooks_url":"https://api.github.com/repos/evbevz/core/hooks","issue_events_url":"https://api.github.com/repos/evbevz/core/issues/events{/number}","events_url":"https://api.github.com/repos/evbevz/core/events","assignees_url":"https://api.github.com/repos/evbevz/core/assignees{/user}","branches_url":"https://api.github.com/repos/evbevz/core/branches{/branch}","tags_url":"https://api.github.com/repos/evbevz/core/tags","blobs_url":"https://api.github.com/repos/evbevz/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evbevz/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evbevz/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/evbevz/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evbevz/core/statuses/{sha}","languages_url":"https://api.github.com/repos/evbevz/core/languages","stargazers_url":"https://api.github.com/repos/evbevz/core/stargazers","contributors_url":"https://api.github.com/repos/evbevz/core/contributors","subscribers_url":"https://api.github.com/repos/evbevz/core/subscribers","subscription_url":"https://api.github.com/repos/evbevz/core/subscription","commits_url":"https://api.github.com/repos/evbevz/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/evbevz/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/evbevz/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/evbevz/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/evbevz/core/contents/{+path}","compare_url":"https://api.github.com/repos/evbevz/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evbevz/core/merges","archive_url":"https://api.github.com/repos/evbevz/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evbevz/core/downloads","issues_url":"https://api.github.com/repos/evbevz/core/issues{/number}","pulls_url":"https://api.github.com/repos/evbevz/core/pulls{/number}","milestones_url":"https://api.github.com/repos/evbevz/core/milestones{/number}","notifications_url":"https://api.github.com/repos/evbevz/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evbevz/core/labels{/name}","releases_url":"https://api.github.com/repos/evbevz/core/releases{/id}","deployments_url":"https://api.github.com/repos/evbevz/core/deployments","created_at":"2016-02-23T07:44:54Z","updated_at":"2016-02-23T07:44:59Z","pushed_at":"2017-05-11T08:18:17Z","git_url":"git://github.com/evbevz/core.git","ssh_url":"git@github.com:evbevz/core.git","clone_url":"https://github.com/evbevz/core.git","svn_url":"https://github.com/evbevz/core","homepage":"https://opnsense.org/","size":53795,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"opnsense:master","ref":"master","sha":"0280a875edbf6abdac5d397367a281b4c7bc1262","user":{"login":"opnsense","id":9979117,"avatar_url":"https://avatars0.githubusercontent.com/u/9979117?v=3","gravatar_id":"","url":"https://api.github.com/users/opnsense","html_url":"https://github.com/opnsense","followers_url":"https://api.github.com/users/opnsense/followers","following_url":"https://api.github.com/users/opnsense/following{/other_user}","gists_url":"https://api.github.com/users/opnsense/gists{/gist_id}","starred_url":"https://api.github.com/users/opnsense/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opnsense/subscriptions","organizations_url":"https://api.github.com/users/opnsense/orgs","repos_url":"https://api.github.com/users/opnsense/repos","events_url":"https://api.github.com/users/opnsense/events{/privacy}","received_events_url":"https://api.github.com/users/opnsense/received_events","type":"Organization","site_admin":false},"repo":{"id":27965134,"name":"core","full_name":"opnsense/core","owner":{"login":"opnsense","id":9979117,"avatar_url":"https://avatars0.githubusercontent.com/u/9979117?v=3","gravatar_id":"","url":"https://api.github.com/users/opnsense","html_url":"https://github.com/opnsense","followers_url":"https://api.github.com/users/opnsense/followers","following_url":"https://api.github.com/users/opnsense/following{/other_user}","gists_url":"https://api.github.com/users/opnsense/gists{/gist_id}","starred_url":"https://api.github.com/users/opnsense/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opnsense/subscriptions","organizations_url":"https://api.github.com/users/opnsense/orgs","repos_url":"https://api.github.com/users/opnsense/repos","events_url":"https://api.github.com/users/opnsense/events{/privacy}","received_events_url":"https://api.github.com/users/opnsense/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opnsense/core","description":"OPNsense GUI, API and systems backend","fork":false,"url":"https://api.github.com/repos/opnsense/core","forks_url":"https://api.github.com/repos/opnsense/core/forks","keys_url":"https://api.github.com/repos/opnsense/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opnsense/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opnsense/core/teams","hooks_url":"https://api.github.com/repos/opnsense/core/hooks","issue_events_url":"https://api.github.com/repos/opnsense/core/issues/events{/number}","events_url":"https://api.github.com/repos/opnsense/core/events","assignees_url":"https://api.github.com/repos/opnsense/core/assignees{/user}","branches_url":"https://api.github.com/repos/opnsense/core/branches{/branch}","tags_url":"https://api.github.com/repos/opnsense/core/tags","blobs_url":"https://api.github.com/repos/opnsense/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opnsense/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opnsense/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/opnsense/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opnsense/core/statuses/{sha}","languages_url":"https://api.github.com/repos/opnsense/core/languages","stargazers_url":"https://api.github.com/repos/opnsense/core/stargazers","contributors_url":"https://api.github.com/repos/opnsense/core/contributors","subscribers_url":"https://api.github.com/repos/opnsense/core/subscribers","subscription_url":"https://api.github.com/repos/opnsense/core/subscription","commits_url":"https://api.github.com/repos/opnsense/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/opnsense/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/opnsense/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/opnsense/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/opnsense/core/contents/{+path}","compare_url":"https://api.github.com/repos/opnsense/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opnsense/core/merges","archive_url":"https://api.github.com/repos/opnsense/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opnsense/core/downloads","issues_url":"https://api.github.com/repos/opnsense/core/issues{/number}","pulls_url":"https://api.github.com/repos/opnsense/core/pulls{/number}","milestones_url":"https://api.github.com/repos/opnsense/core/milestones{/number}","notifications_url":"https://api.github.com/repos/opnsense/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opnsense/core/labels{/name}","releases_url":"https://api.github.com/repos/opnsense/core/releases{/id}","deployments_url":"https://api.github.com/repos/opnsense/core/deployments","created_at":"2014-12-13T15:43:50Z","updated_at":"2017-05-09T14:33:04Z","pushed_at":"2017-05-11T08:18:19Z","git_url":"git://github.com/opnsense/core.git","ssh_url":"git@github.com:opnsense/core.git","clone_url":"https://github.com/opnsense/core.git","svn_url":"https://github.com/opnsense/core","homepage":"https://opnsense.org/","size":55100,"stargazers_count":379,"watchers_count":379,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":119,"mirror_url":null,"open_issues_count":192,"forks":119,"open_issues":192,"watchers":379,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opnsense/core/pulls/1613"},"html":{"href":"https://github.com/opnsense/core/pull/1613"},"issue":{"href":"https://api.github.com/repos/opnsense/core/issues/1613"},"comments":{"href":"https://api.github.com/repos/opnsense/core/issues/1613/comments"},"review_comments":{"href":"https://api.github.com/repos/opnsense/core/pulls/1613/comments"},"review_comment":{"href":"https://api.github.com/repos/opnsense/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opnsense/core/pulls/1613/commits"},"statuses":{"href":"https://api.github.com/repos/opnsense/core/statuses/ae3022645cdd4f045b648ff9eec2d78b7af1f4c1"}}}}
{"actor":{"display_login":"evbevz"}}