{"action":"opened","number":8513,"pull_request":{"url":"https://api.github.com/repos/cilium/cilium/pulls/8513","id":296146016,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk2MTQ2MDE2","html_url":"https://github.com/cilium/cilium/pull/8513","diff_url":"https://github.com/cilium/cilium/pull/8513.diff","patch_url":"https://github.com/cilium/cilium/pull/8513.patch","issue_url":"https://api.github.com/repos/cilium/cilium/issues/8513","number":8513,"state":"open","locked":false,"title":"datapath: Do not fail if route contains gw equal to dst","user":{"login":"brb","id":122571,"node_id":"MDQ6VXNlcjEyMjU3MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/122571?v=4","gravatar_id":"","url":"https://api.github.com/users/brb","html_url":"https://github.com/brb","followers_url":"https://api.github.com/users/brb/followers","following_url":"https://api.github.com/users/brb/following{/other_user}","gists_url":"https://api.github.com/users/brb/gists{/gist_id}","starred_url":"https://api.github.com/users/brb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brb/subscriptions","organizations_url":"https://api.github.com/users/brb/orgs","repos_url":"https://api.github.com/users/brb/repos","events_url":"https://api.github.com/users/brb/events{/privacy}","received_events_url":"https://api.github.com/users/brb/received_events","type":"User","site_admin":false},"body":"Some recent change in the kernel started to include `RTA_GATEWAY` field in a response to `RTM_GETROUTE` even if a dst was local.\r\n\r\nOn Linux 5.1.6:\r\n```\r\nrecvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=104, type=RTM_NEWROUTE, flags=0, seq=1562755119, pid=29233}, {rtm_family=AF_INET, rtm_dst_len=32, rtm_src_len=0, rtm_tos=0, rtm_table=RT_TABLE_LOCAL, rtm_protocol=RTPROT_UNSPEC, rtm_scope=RT_SCOPE_UNIVERSE, rtm_type=RTN_LOCAL, rtm_flags=RTM_F_CLONED|0x80000000}, [{{nla_len=8, nla_type=RTA_TABLE}, RT_TABLE_LOCAL}, {{nla_len=8, nla_type=RTA_DST}, inet_addr(\"4.4.4.4\")}, {{nla_len=8, nla_type=RTA_OIF}, if_nametoindex(\"lo\")}, {{nla_len=8, nla_type=RTA_PREFSRC}, inet_addr(\"4.4.4.4\")}, {{nla_len=8, nla_type=RTA_UID}, 0}, {{nla_len=36, nla_type=RTA_CACHEINFO}, {rta_clntref=1, rta_lastuse=0, rta_expires=0, rta_error=0, rta_used=0, rta_id=0, rta_ts=0, rta_tsage=0}}]}, iov_len=104}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 104\r\n```\r\nOn Linux 5.2.0-rc5:\r\n```\r\nrecvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=112, type=RTM_NEWROUTE, flags=0, seq=1562754944, pid=4275}, {rtm_family=AF_INET, rtm_dst_len=32, rtm_src_len=0, rtm_tos=0, rtm_table=RT_TABLE_LOCAL, rtm_protocol=RTPROT_UNSPEC, rtm_scope=RT_SCOPE_UNIVERSE, rtm_type=RTN_LOCAL, rtm_flags=RTM_F_CLONED|0x80000000}, [{{nla_len=8, nla_type=RTA_TABLE}, RT_TABLE_LOCAL}, {{nla_len=8, nla_type=RTA_DST}, 4.4.4.4}, {{nla_len=8, nla_type=RTA_OIF}, if_nametoindex(\"lo\")}, {{nla_len=8, nla_type=RTA_PREFSRC}, 4.4.4.4}, {{nla_len=8, nla_type=RTA_GATEWAY}, 4.4.4.4}, {{nla_len=8, nla_type=RTA_UID}, 0}, {{nla_len=36, nla_type=RTA_CACHEINFO}, {rta_clntref=1, rta_lastuse=0, rta_expires=0, rta_error=0, rta_used=0, rta_id=0, rta_ts=0, rta_tsage=0}}]}, iov_len=112}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 112\r\n```\r\nThis commit extends the check for route to a non-directly reachable gateway by making the check to pass if a gateway IP addr is equal to a given dst IP address.\r\n\r\nShould fix the `RuntimePrivilegedUnitTests` failure observed when running on `ubuntu-next`:\r\n```\r\n level=warning msg=\"Unable to install direct node route {Ifindex: 0 Dst: 5.5.5.0/24 Src: <nil> Gw: 4.4.4.4 Flags: [] Table: 0}\" error=\"route to destination 4.4.4.4 contains gateway 4.4.4.4, must be directly reachable\" subsys=linux-datapath\r\n\t node_linux_test.go:668:\r\n\t     c.Assert(err, check.IsNil)\r\n\t ... value *errors.errorString = &errors.errorString{s:\"route to destination 4.4.4.4 contains gateway 4.4.4.4, must be directly reachable\"} (\"route to destination 4.4.4.4 contains gateway 4.4.4.4, must be directly reachable\")\r\n```","created_at":"2019-07-10T12:15:33Z","updated_at":"2019-07-10T12:15:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[{"name":"bpf","id":2519779,"node_id":"MDQ6VGVhbTI1MTk3Nzk=","slug":"bpf","description":"BPF datapath","privacy":"closed","url":"https://api.github.com/teams/2519779","html_url":"https://github.com/orgs/cilium/teams/bpf","members_url":"https://api.github.com/teams/2519779/members{/member}","repositories_url":"https://api.github.com/teams/2519779/repos","permission":"pull"}],"labels":[{"id":721252768,"node_id":"MDU6TGFiZWw3MjEyNTI3Njg=","url":"https://api.github.com/repos/cilium/cilium/labels/area/datapath","name":"area/datapath","color":"bfdadc","default":false},{"id":300384439,"node_id":"MDU6TGFiZWwzMDAzODQ0Mzk=","url":"https://api.github.com/repos/cilium/cilium/labels/kind/bug","name":"kind/bug","color":"fc2929","default":false},{"id":1309754698,"node_id":"MDU6TGFiZWwxMzA5NzU0Njk4","url":"https://api.github.com/repos/cilium/cilium/labels/needs-backport/1.5","name":"needs-backport/1.5","color":"efe775","default":false},{"id":403149902,"node_id":"MDU6TGFiZWw0MDMxNDk5MDI=","url":"https://api.github.com/repos/cilium/cilium/labels/pending-review","name":"pending-review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/cilium/cilium/pulls/8513/commits","review_comments_url":"https://api.github.com/repos/cilium/cilium/pulls/8513/comments","review_comment_url":"https://api.github.com/repos/cilium/cilium/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cilium/cilium/issues/8513/comments","statuses_url":"https://api.github.com/repos/cilium/cilium/statuses/5a8eb25bf68b629b75b97682a15ae0c10412ce0c","head":{"label":"cilium:pr/brb/fix-rta-gw5D","ref":"pr/brb/fix-rta-gw5D","sha":"5a8eb25bf68b629b75b97682a15ae0c10412ce0c","user":{"login":"cilium","id":21054566,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDU0NTY2","avatar_url":"https://avatars0.githubusercontent.com/u/21054566?v=4","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"repo":{"id":48109239,"node_id":"MDEwOlJlcG9zaXRvcnk0ODEwOTIzOQ==","name":"cilium","full_name":"cilium/cilium","private":false,"owner":{"login":"cilium","id":21054566,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDU0NTY2","avatar_url":"https://avatars0.githubusercontent.com/u/21054566?v=4","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cilium/cilium","description":"API Aware Networking and Security using BPF and XDP","fork":false,"url":"https://api.github.com/repos/cilium/cilium","forks_url":"https://api.github.com/repos/cilium/cilium/forks","keys_url":"https://api.github.com/repos/cilium/cilium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cilium/cilium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cilium/cilium/teams","hooks_url":"https://api.github.com/repos/cilium/cilium/hooks","issue_events_url":"https://api.github.com/repos/cilium/cilium/issues/events{/number}","events_url":"https://api.github.com/repos/cilium/cilium/events","assignees_url":"https://api.github.com/repos/cilium/cilium/assignees{/user}","branches_url":"https://api.github.com/repos/cilium/cilium/branches{/branch}","tags_url":"https://api.github.com/repos/cilium/cilium/tags","blobs_url":"https://api.github.com/repos/cilium/cilium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cilium/cilium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cilium/cilium/git/refs{/sha}","trees_url":"https://api.github.com/repos/cilium/cilium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cilium/cilium/statuses/{sha}","languages_url":"https://api.github.com/repos/cilium/cilium/languages","stargazers_url":"https://api.github.com/repos/cilium/cilium/stargazers","contributors_url":"https://api.github.com/repos/cilium/cilium/contributors","subscribers_url":"https://api.github.com/repos/cilium/cilium/subscribers","subscription_url":"https://api.github.com/repos/cilium/cilium/subscription","commits_url":"https://api.github.com/repos/cilium/cilium/commits{/sha}","git_commits_url":"https://api.github.com/repos/cilium/cilium/git/commits{/sha}","comments_url":"https://api.github.com/repos/cilium/cilium/comments{/number}","issue_comment_url":"https://api.github.com/repos/cilium/cilium/issues/comments{/number}","contents_url":"https://api.github.com/repos/cilium/cilium/contents/{+path}","compare_url":"https://api.github.com/repos/cilium/cilium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cilium/cilium/merges","archive_url":"https://api.github.com/repos/cilium/cilium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cilium/cilium/downloads","issues_url":"https://api.github.com/repos/cilium/cilium/issues{/number}","pulls_url":"https://api.github.com/repos/cilium/cilium/pulls{/number}","milestones_url":"https://api.github.com/repos/cilium/cilium/milestones{/number}","notifications_url":"https://api.github.com/repos/cilium/cilium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cilium/cilium/labels{/name}","releases_url":"https://api.github.com/repos/cilium/cilium/releases{/id}","deployments_url":"https://api.github.com/repos/cilium/cilium/deployments","created_at":"2015-12-16T12:33:31Z","updated_at":"2019-07-10T08:51:51Z","pushed_at":"2019-07-10T12:12:21Z","git_url":"git://github.com/cilium/cilium.git","ssh_url":"git@github.com:cilium/cilium.git","clone_url":"https://github.com/cilium/cilium.git","svn_url":"https://github.com/cilium/cilium","homepage":"","size":99238,"stargazers_count":4116,"watchers_count":4116,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":382,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":335,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":382,"open_issues":335,"watchers":4116,"default_branch":"master"}},"base":{"label":"cilium:master","ref":"master","sha":"ff6b0077def75e2139ddb905bf6d3a7698c1b007","user":{"login":"cilium","id":21054566,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDU0NTY2","avatar_url":"https://avatars0.githubusercontent.com/u/21054566?v=4","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"repo":{"id":48109239,"node_id":"MDEwOlJlcG9zaXRvcnk0ODEwOTIzOQ==","name":"cilium","full_name":"cilium/cilium","private":false,"owner":{"login":"cilium","id":21054566,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDU0NTY2","avatar_url":"https://avatars0.githubusercontent.com/u/21054566?v=4","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cilium/cilium","description":"API Aware Networking and Security using BPF and XDP","fork":false,"url":"https://api.github.com/repos/cilium/cilium","forks_url":"https://api.github.com/repos/cilium/cilium/forks","keys_url":"https://api.github.com/repos/cilium/cilium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cilium/cilium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cilium/cilium/teams","hooks_url":"https://api.github.com/repos/cilium/cilium/hooks","issue_events_url":"https://api.github.com/repos/cilium/cilium/issues/events{/number}","events_url":"https://api.github.com/repos/cilium/cilium/events","assignees_url":"https://api.github.com/repos/cilium/cilium/assignees{/user}","branches_url":"https://api.github.com/repos/cilium/cilium/branches{/branch}","tags_url":"https://api.github.com/repos/cilium/cilium/tags","blobs_url":"https://api.github.com/repos/cilium/cilium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cilium/cilium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cilium/cilium/git/refs{/sha}","trees_url":"https://api.github.com/repos/cilium/cilium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cilium/cilium/statuses/{sha}","languages_url":"https://api.github.com/repos/cilium/cilium/languages","stargazers_url":"https://api.github.com/repos/cilium/cilium/stargazers","contributors_url":"https://api.github.com/repos/cilium/cilium/contributors","subscribers_url":"https://api.github.com/repos/cilium/cilium/subscribers","subscription_url":"https://api.github.com/repos/cilium/cilium/subscription","commits_url":"https://api.github.com/repos/cilium/cilium/commits{/sha}","git_commits_url":"https://api.github.com/repos/cilium/cilium/git/commits{/sha}","comments_url":"https://api.github.com/repos/cilium/cilium/comments{/number}","issue_comment_url":"https://api.github.com/repos/cilium/cilium/issues/comments{/number}","contents_url":"https://api.github.com/repos/cilium/cilium/contents/{+path}","compare_url":"https://api.github.com/repos/cilium/cilium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cilium/cilium/merges","archive_url":"https://api.github.com/repos/cilium/cilium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cilium/cilium/downloads","issues_url":"https://api.github.com/repos/cilium/cilium/issues{/number}","pulls_url":"https://api.github.com/repos/cilium/cilium/pulls{/number}","milestones_url":"https://api.github.com/repos/cilium/cilium/milestones{/number}","notifications_url":"https://api.github.com/repos/cilium/cilium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cilium/cilium/labels{/name}","releases_url":"https://api.github.com/repos/cilium/cilium/releases{/id}","deployments_url":"https://api.github.com/repos/cilium/cilium/deployments","created_at":"2015-12-16T12:33:31Z","updated_at":"2019-07-10T08:51:51Z","pushed_at":"2019-07-10T12:12:21Z","git_url":"git://github.com/cilium/cilium.git","ssh_url":"git@github.com:cilium/cilium.git","clone_url":"https://github.com/cilium/cilium.git","svn_url":"https://github.com/cilium/cilium","homepage":"","size":99238,"stargazers_count":4116,"watchers_count":4116,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":382,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":335,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":382,"open_issues":335,"watchers":4116,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cilium/cilium/pulls/8513"},"html":{"href":"https://github.com/cilium/cilium/pull/8513"},"issue":{"href":"https://api.github.com/repos/cilium/cilium/issues/8513"},"comments":{"href":"https://api.github.com/repos/cilium/cilium/issues/8513/comments"},"review_comments":{"href":"https://api.github.com/repos/cilium/cilium/pulls/8513/comments"},"review_comment":{"href":"https://api.github.com/repos/cilium/cilium/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cilium/cilium/pulls/8513/commits"},"statuses":{"href":"https://api.github.com/repos/cilium/cilium/statuses/5a8eb25bf68b629b75b97682a15ae0c10412ce0c"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"brb"}}