{"action":"created","comment":{"url":"https://api.github.com/repos/systemd/systemd/pulls/comments/63368499","id":63368499,"diff_hunk":"@@ -1020,6 +1020,12 @@ static int link_enter_set_addresses(Link *link) {\n                                 log_link_warning_errno(link, r, \"Failed to set NTP server for DHCP server, ignoring: %m\");\n                 }\n \n+                if (link->network->dhcp_server_emit_router) {\n+                        r = sd_dhcp_server_set_emit_router(link->dhcp_server, true);","path":"src/network/networkd-link.c","position":5,"original_position":5,"commit_id":"d1d9ac28667a2f1deb99d25b10b7490f27e5e7a3","original_commit_id":"d1d9ac28667a2f1deb99d25b10b7490f27e5e7a3","user":{"login":"keszybz","id":349618,"avatar_url":"https://avatars.githubusercontent.com/u/349618?v=3","gravatar_id":"","url":"https://api.github.com/users/keszybz","html_url":"https://github.com/keszybz","followers_url":"https://api.github.com/users/keszybz/followers","following_url":"https://api.github.com/users/keszybz/following{/other_user}","gists_url":"https://api.github.com/users/keszybz/gists{/gist_id}","starred_url":"https://api.github.com/users/keszybz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keszybz/subscriptions","organizations_url":"https://api.github.com/users/keszybz/orgs","repos_url":"https://api.github.com/users/keszybz/repos","events_url":"https://api.github.com/users/keszybz/events{/privacy}","received_events_url":"https://api.github.com/users/keszybz/received_events","type":"User","site_admin":false},"body":"Why not do away with the conditional and call `sd_dhcp_server_set_emit_router(link->dhcp_server, link->network->dhcp_server_emit_router)` always? You also need `log_link_warning_errno` like in other places in this function.","created_at":"2016-05-16T15:06:16Z","updated_at":"2016-05-16T15:06:16Z","html_url":"https://github.com/systemd/systemd/pull/3251#discussion_r63368499","pull_request_url":"https://api.github.com/repos/systemd/systemd/pulls/3251","_links":{"self":{"href":"https://api.github.com/repos/systemd/systemd/pulls/comments/63368499"},"html":{"href":"https://github.com/systemd/systemd/pull/3251#discussion_r63368499"},"pull_request":{"href":"https://api.github.com/repos/systemd/systemd/pulls/3251"}}},"pull_request":{"url":"https://api.github.com/repos/systemd/systemd/pulls/3251","id":70058215,"html_url":"https://github.com/systemd/systemd/pull/3251","diff_url":"https://github.com/systemd/systemd/pull/3251.diff","patch_url":"https://github.com/systemd/systemd/pull/3251.patch","issue_url":"https://api.github.com/repos/systemd/systemd/issues/3251","number":3251,"state":"open","locked":false,"title":"networkd: Add EmitRouter= option for DHCP Server","user":{"login":"clemensg","id":201310,"avatar_url":"https://avatars.githubusercontent.com/u/201310?v=3","gravatar_id":"","url":"https://api.github.com/users/clemensg","html_url":"https://github.com/clemensg","followers_url":"https://api.github.com/users/clemensg/followers","following_url":"https://api.github.com/users/clemensg/following{/other_user}","gists_url":"https://api.github.com/users/clemensg/gists{/gist_id}","starred_url":"https://api.github.com/users/clemensg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clemensg/subscriptions","organizations_url":"https://api.github.com/users/clemensg/orgs","repos_url":"https://api.github.com/users/clemensg/repos","events_url":"https://api.github.com/users/clemensg/events{/privacy}","received_events_url":"https://api.github.com/users/clemensg/received_events","type":"User","site_admin":false},"body":"Add an option to disable appending DHCP option 3 (Router) to the DHCP\r\nOFFER and ACK packets.\r\nThis commit adds the boolean option `EmitRouter=` for the [DHCPServer]\r\nsection in .network files.\r\n\r\nRationale: On embedded devices, it is very useful to have a DHCP server\r\nrunning on an USB OTG ethernet gadget interface to avoid manual setup on\r\nthe client PCs, but it should only serve IP addresses, no routers.\r\nOtherwise, Windows clients experience network connectivity issues, due\r\nto them using the address set in DHCP option 3 as default gateway.","created_at":"2016-05-13T21:05:32Z","updated_at":"2016-05-16T15:06:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"156abdc89d8b9e386a5aea94a5c18a704265b1d6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/systemd/systemd/pulls/3251/commits","review_comments_url":"https://api.github.com/repos/systemd/systemd/pulls/3251/comments","review_comment_url":"https://api.github.com/repos/systemd/systemd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/3251/comments","statuses_url":"https://api.github.com/repos/systemd/systemd/statuses/d1d9ac28667a2f1deb99d25b10b7490f27e5e7a3","head":{"label":"clemensg:dhcp_server_emit_router","ref":"dhcp_server_emit_router","sha":"d1d9ac28667a2f1deb99d25b10b7490f27e5e7a3","user":{"login":"clemensg","id":201310,"avatar_url":"https://avatars.githubusercontent.com/u/201310?v=3","gravatar_id":"","url":"https://api.github.com/users/clemensg","html_url":"https://github.com/clemensg","followers_url":"https://api.github.com/users/clemensg/followers","following_url":"https://api.github.com/users/clemensg/following{/other_user}","gists_url":"https://api.github.com/users/clemensg/gists{/gist_id}","starred_url":"https://api.github.com/users/clemensg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clemensg/subscriptions","organizations_url":"https://api.github.com/users/clemensg/orgs","repos_url":"https://api.github.com/users/clemensg/repos","events_url":"https://api.github.com/users/clemensg/events{/privacy}","received_events_url":"https://api.github.com/users/clemensg/received_events","type":"User","site_admin":false},"repo":{"id":55624649,"name":"systemd","full_name":"clemensg/systemd","owner":{"login":"clemensg","id":201310,"avatar_url":"https://avatars.githubusercontent.com/u/201310?v=3","gravatar_id":"","url":"https://api.github.com/users/clemensg","html_url":"https://github.com/clemensg","followers_url":"https://api.github.com/users/clemensg/followers","following_url":"https://api.github.com/users/clemensg/following{/other_user}","gists_url":"https://api.github.com/users/clemensg/gists{/gist_id}","starred_url":"https://api.github.com/users/clemensg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clemensg/subscriptions","organizations_url":"https://api.github.com/users/clemensg/orgs","repos_url":"https://api.github.com/users/clemensg/repos","events_url":"https://api.github.com/users/clemensg/events{/privacy}","received_events_url":"https://api.github.com/users/clemensg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/clemensg/systemd","description":"systemd upstream","fork":true,"url":"https://api.github.com/repos/clemensg/systemd","forks_url":"https://api.github.com/repos/clemensg/systemd/forks","keys_url":"https://api.github.com/repos/clemensg/systemd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clemensg/systemd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clemensg/systemd/teams","hooks_url":"https://api.github.com/repos/clemensg/systemd/hooks","issue_events_url":"https://api.github.com/repos/clemensg/systemd/issues/events{/number}","events_url":"https://api.github.com/repos/clemensg/systemd/events","assignees_url":"https://api.github.com/repos/clemensg/systemd/assignees{/user}","branches_url":"https://api.github.com/repos/clemensg/systemd/branches{/branch}","tags_url":"https://api.github.com/repos/clemensg/systemd/tags","blobs_url":"https://api.github.com/repos/clemensg/systemd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clemensg/systemd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clemensg/systemd/git/refs{/sha}","trees_url":"https://api.github.com/repos/clemensg/systemd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clemensg/systemd/statuses/{sha}","languages_url":"https://api.github.com/repos/clemensg/systemd/languages","stargazers_url":"https://api.github.com/repos/clemensg/systemd/stargazers","contributors_url":"https://api.github.com/repos/clemensg/systemd/contributors","subscribers_url":"https://api.github.com/repos/clemensg/systemd/subscribers","subscription_url":"https://api.github.com/repos/clemensg/systemd/subscription","commits_url":"https://api.github.com/repos/clemensg/systemd/commits{/sha}","git_commits_url":"https://api.github.com/repos/clemensg/systemd/git/commits{/sha}","comments_url":"https://api.github.com/repos/clemensg/systemd/comments{/number}","issue_comment_url":"https://api.github.com/repos/clemensg/systemd/issues/comments{/number}","contents_url":"https://api.github.com/repos/clemensg/systemd/contents/{+path}","compare_url":"https://api.github.com/repos/clemensg/systemd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clemensg/systemd/merges","archive_url":"https://api.github.com/repos/clemensg/systemd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clemensg/systemd/downloads","issues_url":"https://api.github.com/repos/clemensg/systemd/issues{/number}","pulls_url":"https://api.github.com/repos/clemensg/systemd/pulls{/number}","milestones_url":"https://api.github.com/repos/clemensg/systemd/milestones{/number}","notifications_url":"https://api.github.com/repos/clemensg/systemd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clemensg/systemd/labels{/name}","releases_url":"https://api.github.com/repos/clemensg/systemd/releases{/id}","deployments_url":"https://api.github.com/repos/clemensg/systemd/deployments","created_at":"2016-04-06T17:02:24Z","updated_at":"2016-04-06T17:02:30Z","pushed_at":"2016-05-15T20:34:38Z","git_url":"git://github.com/clemensg/systemd.git","ssh_url":"git@github.com:clemensg/systemd.git","clone_url":"https://github.com/clemensg/systemd.git","svn_url":"https://github.com/clemensg/systemd","homepage":"http://www.freedesktop.org/wiki/Software/systemd/","size":59902,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"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":"systemd:master","ref":"master","sha":"bc48c51f72d86c6f690724f251892da5657116ac","user":{"login":"systemd","id":1918868,"avatar_url":"https://avatars.githubusercontent.com/u/1918868?v=3","gravatar_id":"","url":"https://api.github.com/users/systemd","html_url":"https://github.com/systemd","followers_url":"https://api.github.com/users/systemd/followers","following_url":"https://api.github.com/users/systemd/following{/other_user}","gists_url":"https://api.github.com/users/systemd/gists{/gist_id}","starred_url":"https://api.github.com/users/systemd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemd/subscriptions","organizations_url":"https://api.github.com/users/systemd/orgs","repos_url":"https://api.github.com/users/systemd/repos","events_url":"https://api.github.com/users/systemd/events{/privacy}","received_events_url":"https://api.github.com/users/systemd/received_events","type":"Organization","site_admin":false},"repo":{"id":32873313,"name":"systemd","full_name":"systemd/systemd","owner":{"login":"systemd","id":1918868,"avatar_url":"https://avatars.githubusercontent.com/u/1918868?v=3","gravatar_id":"","url":"https://api.github.com/users/systemd","html_url":"https://github.com/systemd","followers_url":"https://api.github.com/users/systemd/followers","following_url":"https://api.github.com/users/systemd/following{/other_user}","gists_url":"https://api.github.com/users/systemd/gists{/gist_id}","starred_url":"https://api.github.com/users/systemd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemd/subscriptions","organizations_url":"https://api.github.com/users/systemd/orgs","repos_url":"https://api.github.com/users/systemd/repos","events_url":"https://api.github.com/users/systemd/events{/privacy}","received_events_url":"https://api.github.com/users/systemd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/systemd/systemd","description":"systemd upstream","fork":false,"url":"https://api.github.com/repos/systemd/systemd","forks_url":"https://api.github.com/repos/systemd/systemd/forks","keys_url":"https://api.github.com/repos/systemd/systemd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/systemd/systemd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/systemd/systemd/teams","hooks_url":"https://api.github.com/repos/systemd/systemd/hooks","issue_events_url":"https://api.github.com/repos/systemd/systemd/issues/events{/number}","events_url":"https://api.github.com/repos/systemd/systemd/events","assignees_url":"https://api.github.com/repos/systemd/systemd/assignees{/user}","branches_url":"https://api.github.com/repos/systemd/systemd/branches{/branch}","tags_url":"https://api.github.com/repos/systemd/systemd/tags","blobs_url":"https://api.github.com/repos/systemd/systemd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/systemd/systemd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/systemd/systemd/git/refs{/sha}","trees_url":"https://api.github.com/repos/systemd/systemd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/systemd/systemd/statuses/{sha}","languages_url":"https://api.github.com/repos/systemd/systemd/languages","stargazers_url":"https://api.github.com/repos/systemd/systemd/stargazers","contributors_url":"https://api.github.com/repos/systemd/systemd/contributors","subscribers_url":"https://api.github.com/repos/systemd/systemd/subscribers","subscription_url":"https://api.github.com/repos/systemd/systemd/subscription","commits_url":"https://api.github.com/repos/systemd/systemd/commits{/sha}","git_commits_url":"https://api.github.com/repos/systemd/systemd/git/commits{/sha}","comments_url":"https://api.github.com/repos/systemd/systemd/comments{/number}","issue_comment_url":"https://api.github.com/repos/systemd/systemd/issues/comments{/number}","contents_url":"https://api.github.com/repos/systemd/systemd/contents/{+path}","compare_url":"https://api.github.com/repos/systemd/systemd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/systemd/systemd/merges","archive_url":"https://api.github.com/repos/systemd/systemd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/systemd/systemd/downloads","issues_url":"https://api.github.com/repos/systemd/systemd/issues{/number}","pulls_url":"https://api.github.com/repos/systemd/systemd/pulls{/number}","milestones_url":"https://api.github.com/repos/systemd/systemd/milestones{/number}","notifications_url":"https://api.github.com/repos/systemd/systemd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/systemd/systemd/labels{/name}","releases_url":"https://api.github.com/repos/systemd/systemd/releases{/id}","deployments_url":"https://api.github.com/repos/systemd/systemd/deployments","created_at":"2015-03-25T15:27:27Z","updated_at":"2016-05-16T13:06:08Z","pushed_at":"2016-05-16T14:58:46Z","git_url":"git://github.com/systemd/systemd.git","ssh_url":"git@github.com:systemd/systemd.git","clone_url":"https://github.com/systemd/systemd.git","svn_url":"https://github.com/systemd/systemd","homepage":"http://www.freedesktop.org/wiki/Software/systemd/","size":73319,"stargazers_count":1075,"watchers_count":1075,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":433,"mirror_url":null,"open_issues_count":340,"forks":433,"open_issues":340,"watchers":1075,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/systemd/systemd/pulls/3251"},"html":{"href":"https://github.com/systemd/systemd/pull/3251"},"issue":{"href":"https://api.github.com/repos/systemd/systemd/issues/3251"},"comments":{"href":"https://api.github.com/repos/systemd/systemd/issues/3251/comments"},"review_comments":{"href":"https://api.github.com/repos/systemd/systemd/pulls/3251/comments"},"review_comment":{"href":"https://api.github.com/repos/systemd/systemd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/systemd/systemd/pulls/3251/commits"},"statuses":{"href":"https://api.github.com/repos/systemd/systemd/statuses/d1d9ac28667a2f1deb99d25b10b7490f27e5e7a3"}}}}