{"action":"created","comment":{"url":"https://api.github.com/repos/docker/libnetwork/pulls/comments/31298560","id":31298560,"diff_hunk":"@@ -31,7 +32,29 @@ func setupDevice(config *NetworkConfiguration, i *bridgeInterface) error {\n \t}\n \n \t// Call out to netlink to create the device.\n-\treturn netlink.LinkAdd(i.Link)\n+\tif err = netlink.LinkAdd(i.Link); err != nil {\n+\t\treturn types.InternalErrorf(\"Failed to program bridge link: %s\", err.Error())\n+\t}\n+\n+\tif config.FixedCIDRv6 != nil {\n+\t\t// Setting route to global IPv6 subnet\n+\t\tlog.Infof(\"Adding route to IPv6 network %s via device %s\", config.FixedCIDRv6.String(), config.BridgeName)\n+\n+\t\t// Find the network interface identified by config.BridgeName\n+\t\tlink, err := netlink.LinkByName(config.BridgeName)\n+\t\tif err != nil {\n+\t\t\treturn types.InternalErrorf(\"Failed to get link by bridge name(%s) : %s\", config.BridgeName, err.Error())\n+\t\t}\n+\t\terr = netlink.RouteAdd(&netlink.Route{\n+\t\t\tScope:     netlink.SCOPE_UNIVERSE,\n+\t\t\tLinkIndex: link.Attrs().Index,\n+\t\t\tDst:       config.FixedCIDRv6,\n+\t\t})\n+\t\tif err != nil {\n+\t\t\tlog.Errorf(\"Could not add route to IPv6 network %s via device %s\", config.FixedCIDRv6.String(), config.BridgeName)","path":"drivers/bridge/setup_device.go","position":32,"original_position":32,"commit_id":"08e65a043dd09ebeabf2c4be59622e61a64c9728","original_commit_id":"08e65a043dd09ebeabf2c4be59622e61a64c9728","user":{"login":"mavenugo","id":5056191,"avatar_url":"https://avatars.githubusercontent.com/u/5056191?v=3","gravatar_id":"","url":"https://api.github.com/users/mavenugo","html_url":"https://github.com/mavenugo","followers_url":"https://api.github.com/users/mavenugo/followers","following_url":"https://api.github.com/users/mavenugo/following{/other_user}","gists_url":"https://api.github.com/users/mavenugo/gists{/gist_id}","starred_url":"https://api.github.com/users/mavenugo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavenugo/subscriptions","organizations_url":"https://api.github.com/users/mavenugo/orgs","repos_url":"https://api.github.com/users/mavenugo/repos","events_url":"https://api.github.com/users/mavenugo/events{/privacy}","received_events_url":"https://api.github.com/users/mavenugo/received_events","type":"User","site_admin":false},"body":"I dont think logging errors should have this need.\r\nAs per golang recommendation, it is for errors being returned... not for logging I think","created_at":"2015-05-29T04:36:36Z","updated_at":"2015-05-29T04:36:36Z","html_url":"https://github.com/docker/libnetwork/pull/231#discussion_r31298560","pull_request_url":"https://api.github.com/repos/docker/libnetwork/pulls/231","_links":{"self":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/comments/31298560"},"html":{"href":"https://github.com/docker/libnetwork/pull/231#discussion_r31298560"},"pull_request":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/231"}}},"pull_request":{"url":"https://api.github.com/repos/docker/libnetwork/pulls/231","id":36462610,"html_url":"https://github.com/docker/libnetwork/pull/231","diff_url":"https://github.com/docker/libnetwork/pull/231.diff","patch_url":"https://github.com/docker/libnetwork/pull/231.patch","issue_url":"https://api.github.com/repos/docker/libnetwork/issues/231","number":231,"state":"open","locked":false,"title":"Fixes https://github.com/docker/docker/issues/13426","user":{"login":"mavenugo","id":5056191,"avatar_url":"https://avatars.githubusercontent.com/u/5056191?v=3","gravatar_id":"","url":"https://api.github.com/users/mavenugo","html_url":"https://github.com/mavenugo","followers_url":"https://api.github.com/users/mavenugo/followers","following_url":"https://api.github.com/users/mavenugo/following{/other_user}","gists_url":"https://api.github.com/users/mavenugo/gists{/gist_id}","starred_url":"https://api.github.com/users/mavenugo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavenugo/subscriptions","organizations_url":"https://api.github.com/users/mavenugo/orgs","repos_url":"https://api.github.com/users/mavenugo/repos","events_url":"https://api.github.com/users/mavenugo/events{/privacy}","received_events_url":"https://api.github.com/users/mavenugo/received_events","type":"User","site_admin":false},"body":"Ported the code over and adjusted to the setup process and the new netlink library\r\nFixes https://github.com/docker/docker/issues/13426\r\n\r\nSigned-off-by: Madhu Venugopal <madhu@docker.com>","created_at":"2015-05-28T23:52:32Z","updated_at":"2015-05-29T04:36:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7978409561409db3b32a2e4e1b485aed28362f8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/libnetwork/pulls/231/commits","review_comments_url":"https://api.github.com/repos/docker/libnetwork/pulls/231/comments","review_comment_url":"https://api.github.com/repos/docker/libnetwork/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/libnetwork/issues/231/comments","statuses_url":"https://api.github.com/repos/docker/libnetwork/statuses/08e65a043dd09ebeabf2c4be59622e61a64c9728","head":{"label":"mavenugo:1.7.0","ref":"1.7.0","sha":"08e65a043dd09ebeabf2c4be59622e61a64c9728","user":{"login":"mavenugo","id":5056191,"avatar_url":"https://avatars.githubusercontent.com/u/5056191?v=3","gravatar_id":"","url":"https://api.github.com/users/mavenugo","html_url":"https://github.com/mavenugo","followers_url":"https://api.github.com/users/mavenugo/followers","following_url":"https://api.github.com/users/mavenugo/following{/other_user}","gists_url":"https://api.github.com/users/mavenugo/gists{/gist_id}","starred_url":"https://api.github.com/users/mavenugo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavenugo/subscriptions","organizations_url":"https://api.github.com/users/mavenugo/orgs","repos_url":"https://api.github.com/users/mavenugo/repos","events_url":"https://api.github.com/users/mavenugo/events{/privacy}","received_events_url":"https://api.github.com/users/mavenugo/received_events","type":"User","site_admin":false},"repo":{"id":34572010,"name":"libnetwork","full_name":"mavenugo/libnetwork","owner":{"login":"mavenugo","id":5056191,"avatar_url":"https://avatars.githubusercontent.com/u/5056191?v=3","gravatar_id":"","url":"https://api.github.com/users/mavenugo","html_url":"https://github.com/mavenugo","followers_url":"https://api.github.com/users/mavenugo/followers","following_url":"https://api.github.com/users/mavenugo/following{/other_user}","gists_url":"https://api.github.com/users/mavenugo/gists{/gist_id}","starred_url":"https://api.github.com/users/mavenugo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavenugo/subscriptions","organizations_url":"https://api.github.com/users/mavenugo/orgs","repos_url":"https://api.github.com/users/mavenugo/repos","events_url":"https://api.github.com/users/mavenugo/events{/privacy}","received_events_url":"https://api.github.com/users/mavenugo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mavenugo/libnetwork","description":"networking for containers","fork":true,"url":"https://api.github.com/repos/mavenugo/libnetwork","forks_url":"https://api.github.com/repos/mavenugo/libnetwork/forks","keys_url":"https://api.github.com/repos/mavenugo/libnetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mavenugo/libnetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mavenugo/libnetwork/teams","hooks_url":"https://api.github.com/repos/mavenugo/libnetwork/hooks","issue_events_url":"https://api.github.com/repos/mavenugo/libnetwork/issues/events{/number}","events_url":"https://api.github.com/repos/mavenugo/libnetwork/events","assignees_url":"https://api.github.com/repos/mavenugo/libnetwork/assignees{/user}","branches_url":"https://api.github.com/repos/mavenugo/libnetwork/branches{/branch}","tags_url":"https://api.github.com/repos/mavenugo/libnetwork/tags","blobs_url":"https://api.github.com/repos/mavenugo/libnetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mavenugo/libnetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mavenugo/libnetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/mavenugo/libnetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mavenugo/libnetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/mavenugo/libnetwork/languages","stargazers_url":"https://api.github.com/repos/mavenugo/libnetwork/stargazers","contributors_url":"https://api.github.com/repos/mavenugo/libnetwork/contributors","subscribers_url":"https://api.github.com/repos/mavenugo/libnetwork/subscribers","subscription_url":"https://api.github.com/repos/mavenugo/libnetwork/subscription","commits_url":"https://api.github.com/repos/mavenugo/libnetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/mavenugo/libnetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/mavenugo/libnetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/mavenugo/libnetwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/mavenugo/libnetwork/contents/{+path}","compare_url":"https://api.github.com/repos/mavenugo/libnetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mavenugo/libnetwork/merges","archive_url":"https://api.github.com/repos/mavenugo/libnetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mavenugo/libnetwork/downloads","issues_url":"https://api.github.com/repos/mavenugo/libnetwork/issues{/number}","pulls_url":"https://api.github.com/repos/mavenugo/libnetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/mavenugo/libnetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/mavenugo/libnetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mavenugo/libnetwork/labels{/name}","releases_url":"https://api.github.com/repos/mavenugo/libnetwork/releases{/id}","created_at":"2015-04-25T14:39:45Z","updated_at":"2015-05-07T18:56:18Z","pushed_at":"2015-05-28T23:51:31Z","git_url":"git://github.com/mavenugo/libnetwork.git","ssh_url":"git@github.com:mavenugo/libnetwork.git","clone_url":"https://github.com/mavenugo/libnetwork.git","svn_url":"https://github.com/mavenugo/libnetwork","homepage":"","size":1428,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:docker1.7.0_integ","ref":"docker1.7.0_integ","sha":"7c2a2c8a871ec52266ef2233aff1acb9cf394d13","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":31046054,"name":"libnetwork","full_name":"docker/libnetwork","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/libnetwork","description":"networking for containers","fork":false,"url":"https://api.github.com/repos/docker/libnetwork","forks_url":"https://api.github.com/repos/docker/libnetwork/forks","keys_url":"https://api.github.com/repos/docker/libnetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/libnetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/libnetwork/teams","hooks_url":"https://api.github.com/repos/docker/libnetwork/hooks","issue_events_url":"https://api.github.com/repos/docker/libnetwork/issues/events{/number}","events_url":"https://api.github.com/repos/docker/libnetwork/events","assignees_url":"https://api.github.com/repos/docker/libnetwork/assignees{/user}","branches_url":"https://api.github.com/repos/docker/libnetwork/branches{/branch}","tags_url":"https://api.github.com/repos/docker/libnetwork/tags","blobs_url":"https://api.github.com/repos/docker/libnetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/libnetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/libnetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/libnetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/libnetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/libnetwork/languages","stargazers_url":"https://api.github.com/repos/docker/libnetwork/stargazers","contributors_url":"https://api.github.com/repos/docker/libnetwork/contributors","subscribers_url":"https://api.github.com/repos/docker/libnetwork/subscribers","subscription_url":"https://api.github.com/repos/docker/libnetwork/subscription","commits_url":"https://api.github.com/repos/docker/libnetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/libnetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/libnetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/libnetwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/libnetwork/contents/{+path}","compare_url":"https://api.github.com/repos/docker/libnetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/libnetwork/merges","archive_url":"https://api.github.com/repos/docker/libnetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/libnetwork/downloads","issues_url":"https://api.github.com/repos/docker/libnetwork/issues{/number}","pulls_url":"https://api.github.com/repos/docker/libnetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/libnetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/libnetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/libnetwork/labels{/name}","releases_url":"https://api.github.com/repos/docker/libnetwork/releases{/id}","created_at":"2015-02-20T01:20:15Z","updated_at":"2015-05-29T01:34:22Z","pushed_at":"2015-05-29T01:41:17Z","git_url":"git://github.com/docker/libnetwork.git","ssh_url":"git@github.com:docker/libnetwork.git","clone_url":"https://github.com/docker/libnetwork.git","svn_url":"https://github.com/docker/libnetwork","homepage":"","size":6619,"stargazers_count":241,"watchers_count":241,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":44,"forks":65,"open_issues":44,"watchers":241,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/231"},"html":{"href":"https://github.com/docker/libnetwork/pull/231"},"issue":{"href":"https://api.github.com/repos/docker/libnetwork/issues/231"},"comments":{"href":"https://api.github.com/repos/docker/libnetwork/issues/231/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/231/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/231/commits"},"statuses":{"href":"https://api.github.com/repos/docker/libnetwork/statuses/08e65a043dd09ebeabf2c4be59622e61a64c9728"}}}}