{"action":"created","comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/57139282","id":57139282,"diff_hunk":"@@ -192,12 +192,30 @@ bool gnrc_rpl_parent_add_by_addr(gnrc_rpl_dodag_t *dodag, ipv6_addr_t *addr,\n \n bool gnrc_rpl_parent_remove(gnrc_rpl_parent_t *parent)\n {\n-    if (parent == parent->dodag->parents) {\n+    assert(parent != NULL);\n+\n+    gnrc_rpl_dodag_t *dodag = parent->dodag;\n+\n+    if (parent == dodag->parents) {\n         fib_remove_entry(&gnrc_ipv6_fib_table,\n                          (uint8_t *) ipv6_addr_unspecified.u8,\n                          sizeof(ipv6_addr_t));\n+\n+        /* set the default route to the next parent for now */\n+        if (parent->next) {\n+            uint32_t now = xtimer_now() / SEC_IN_USEC;\n+            fib_add_entry(&gnrc_ipv6_fib_table,\n+                          dodag->iface,\n+                          (uint8_t *) ipv6_addr_unspecified.u8,\n+                          sizeof(ipv6_addr_t),\n+                          FIB_FLAG_NET_PREFIX,\n+                          parent->next->addr.u8,\n+                          sizeof(ipv6_addr_t),\n+                          FIB_FLAG_RPL_ROUTE,\n+                          (parent->next->lifetime - now) * SEC_IN_MS);\n+        }","path":"sys/net/gnrc/routing/rpl/gnrc_rpl_dodag.c","position":26,"original_position":26,"commit_id":"eae0e4c724df65d33f45696ba74dc2c791b07f12","original_commit_id":"eae0e4c724df65d33f45696ba74dc2c791b07f12","user":{"login":"BytesGalore","id":3903215,"avatar_url":"https://avatars.githubusercontent.com/u/3903215?v=3","gravatar_id":"","url":"https://api.github.com/users/BytesGalore","html_url":"https://github.com/BytesGalore","followers_url":"https://api.github.com/users/BytesGalore/followers","following_url":"https://api.github.com/users/BytesGalore/following{/other_user}","gists_url":"https://api.github.com/users/BytesGalore/gists{/gist_id}","starred_url":"https://api.github.com/users/BytesGalore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BytesGalore/subscriptions","organizations_url":"https://api.github.com/users/BytesGalore/orgs","repos_url":"https://api.github.com/users/BytesGalore/repos","events_url":"https://api.github.com/users/BytesGalore/events{/privacy}","received_events_url":"https://api.github.com/users/BytesGalore/received_events","type":"User","site_admin":false},"body":"but we could remove the removed parent from the FIB","created_at":"2016-03-23T10:45:56Z","updated_at":"2016-03-23T10:45:56Z","html_url":"https://github.com/RIOT-OS/RIOT/pull/5141#discussion_r57139282","pull_request_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5141","_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/57139282"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/5141#discussion_r57139282"},"pull_request":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5141"}}},"pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5141","id":63792591,"html_url":"https://github.com/RIOT-OS/RIOT/pull/5141","diff_url":"https://github.com/RIOT-OS/RIOT/pull/5141.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/5141.patch","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5141","number":5141,"state":"open","locked":false,"title":"gnrc_rpl: new default route when old one was deleted","user":{"login":"cgundogan","id":739129,"avatar_url":"https://avatars.githubusercontent.com/u/739129?v=3","gravatar_id":"","url":"https://api.github.com/users/cgundogan","html_url":"https://github.com/cgundogan","followers_url":"https://api.github.com/users/cgundogan/followers","following_url":"https://api.github.com/users/cgundogan/following{/other_user}","gists_url":"https://api.github.com/users/cgundogan/gists{/gist_id}","starred_url":"https://api.github.com/users/cgundogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgundogan/subscriptions","organizations_url":"https://api.github.com/users/cgundogan/orgs","repos_url":"https://api.github.com/users/cgundogan/repos","events_url":"https://api.github.com/users/cgundogan/events{/privacy}","received_events_url":"https://api.github.com/users/cgundogan/received_events","type":"User","site_admin":false},"body":"Currently, when a node has two parents and the preferred parent times out, the fib entry is not updated accordingly to point to the new preferred parent until a DIO is received.\r\nThis PR adds the new default route pointing to the next preferred parent as soon as the former one gets deleted.\r\n\r\n~~Depends on #5135~~","created_at":"2016-03-22T21:03:43Z","updated_at":"2016-03-23T10:45:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2727bcf7cec0ce80955648986273e8d3e2d93bdc","assignee":{"login":"BytesGalore","id":3903215,"avatar_url":"https://avatars.githubusercontent.com/u/3903215?v=3","gravatar_id":"","url":"https://api.github.com/users/BytesGalore","html_url":"https://github.com/BytesGalore","followers_url":"https://api.github.com/users/BytesGalore/followers","following_url":"https://api.github.com/users/BytesGalore/following{/other_user}","gists_url":"https://api.github.com/users/BytesGalore/gists{/gist_id}","starred_url":"https://api.github.com/users/BytesGalore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BytesGalore/subscriptions","organizations_url":"https://api.github.com/users/BytesGalore/orgs","repos_url":"https://api.github.com/users/BytesGalore/repos","events_url":"https://api.github.com/users/BytesGalore/events{/privacy}","received_events_url":"https://api.github.com/users/BytesGalore/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones/13","html_url":"https://github.com/RIOT-OS/RIOT/milestones/Release%202016.04","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones/13/labels","id":1447832,"number":13,"title":"Release 2016.04","description":"The next major release.","creator":{"login":"OlegHahm","id":1590423,"avatar_url":"https://avatars.githubusercontent.com/u/1590423?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},"open_issues":162,"closed_issues":321,"state":"open","created_at":"2015-12-07T14:56:18Z","updated_at":"2016-03-23T09:57:26Z","due_on":"2016-04-14T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5141/commits","review_comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5141/comments","review_comment_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5141/comments","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/eae0e4c724df65d33f45696ba74dc2c791b07f12","head":{"label":"cgundogan:pr/gnrc_rpl/remove_parent_create_new_fib_entry","ref":"pr/gnrc_rpl/remove_parent_create_new_fib_entry","sha":"eae0e4c724df65d33f45696ba74dc2c791b07f12","user":{"login":"cgundogan","id":739129,"avatar_url":"https://avatars.githubusercontent.com/u/739129?v=3","gravatar_id":"","url":"https://api.github.com/users/cgundogan","html_url":"https://github.com/cgundogan","followers_url":"https://api.github.com/users/cgundogan/followers","following_url":"https://api.github.com/users/cgundogan/following{/other_user}","gists_url":"https://api.github.com/users/cgundogan/gists{/gist_id}","starred_url":"https://api.github.com/users/cgundogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgundogan/subscriptions","organizations_url":"https://api.github.com/users/cgundogan/orgs","repos_url":"https://api.github.com/users/cgundogan/repos","events_url":"https://api.github.com/users/cgundogan/events{/privacy}","received_events_url":"https://api.github.com/users/cgundogan/received_events","type":"User","site_admin":false},"repo":{"id":19483231,"name":"RIOT","full_name":"cgundogan/RIOT","owner":{"login":"cgundogan","id":739129,"avatar_url":"https://avatars.githubusercontent.com/u/739129?v=3","gravatar_id":"","url":"https://api.github.com/users/cgundogan","html_url":"https://github.com/cgundogan","followers_url":"https://api.github.com/users/cgundogan/followers","following_url":"https://api.github.com/users/cgundogan/following{/other_user}","gists_url":"https://api.github.com/users/cgundogan/gists{/gist_id}","starred_url":"https://api.github.com/users/cgundogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgundogan/subscriptions","organizations_url":"https://api.github.com/users/cgundogan/orgs","repos_url":"https://api.github.com/users/cgundogan/repos","events_url":"https://api.github.com/users/cgundogan/events{/privacy}","received_events_url":"https://api.github.com/users/cgundogan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cgundogan/RIOT","description":"RIOT -  The friendly OS for IoT","fork":true,"url":"https://api.github.com/repos/cgundogan/RIOT","forks_url":"https://api.github.com/repos/cgundogan/RIOT/forks","keys_url":"https://api.github.com/repos/cgundogan/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cgundogan/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cgundogan/RIOT/teams","hooks_url":"https://api.github.com/repos/cgundogan/RIOT/hooks","issue_events_url":"https://api.github.com/repos/cgundogan/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/cgundogan/RIOT/events","assignees_url":"https://api.github.com/repos/cgundogan/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/cgundogan/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/cgundogan/RIOT/tags","blobs_url":"https://api.github.com/repos/cgundogan/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cgundogan/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cgundogan/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/cgundogan/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cgundogan/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/cgundogan/RIOT/languages","stargazers_url":"https://api.github.com/repos/cgundogan/RIOT/stargazers","contributors_url":"https://api.github.com/repos/cgundogan/RIOT/contributors","subscribers_url":"https://api.github.com/repos/cgundogan/RIOT/subscribers","subscription_url":"https://api.github.com/repos/cgundogan/RIOT/subscription","commits_url":"https://api.github.com/repos/cgundogan/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/cgundogan/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/cgundogan/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/cgundogan/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/cgundogan/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/cgundogan/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cgundogan/RIOT/merges","archive_url":"https://api.github.com/repos/cgundogan/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cgundogan/RIOT/downloads","issues_url":"https://api.github.com/repos/cgundogan/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/cgundogan/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/cgundogan/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/cgundogan/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cgundogan/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/cgundogan/RIOT/releases{/id}","deployments_url":"https://api.github.com/repos/cgundogan/RIOT/deployments","created_at":"2014-05-06T06:16:02Z","updated_at":"2016-01-11T12:06:28Z","pushed_at":"2016-03-23T10:37:38Z","git_url":"git://github.com/cgundogan/RIOT.git","ssh_url":"git@github.com:cgundogan/RIOT.git","clone_url":"https://github.com/cgundogan/RIOT.git","svn_url":"https://github.com/cgundogan/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":26415,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"RIOT-OS:master","ref":"master","sha":"095e4558df17101b4d7fb40ef6633a128f360d60","user":{"login":"RIOT-OS","id":3079480,"avatar_url":"https://avatars.githubusercontent.com/u/3079480?v=3","gravatar_id":"","url":"https://api.github.com/users/RIOT-OS","html_url":"https://github.com/RIOT-OS","followers_url":"https://api.github.com/users/RIOT-OS/followers","following_url":"https://api.github.com/users/RIOT-OS/following{/other_user}","gists_url":"https://api.github.com/users/RIOT-OS/gists{/gist_id}","starred_url":"https://api.github.com/users/RIOT-OS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIOT-OS/subscriptions","organizations_url":"https://api.github.com/users/RIOT-OS/orgs","repos_url":"https://api.github.com/users/RIOT-OS/repos","events_url":"https://api.github.com/users/RIOT-OS/events{/privacy}","received_events_url":"https://api.github.com/users/RIOT-OS/received_events","type":"Organization","site_admin":false},"repo":{"id":7370241,"name":"RIOT","full_name":"RIOT-OS/RIOT","owner":{"login":"RIOT-OS","id":3079480,"avatar_url":"https://avatars.githubusercontent.com/u/3079480?v=3","gravatar_id":"","url":"https://api.github.com/users/RIOT-OS","html_url":"https://github.com/RIOT-OS","followers_url":"https://api.github.com/users/RIOT-OS/followers","following_url":"https://api.github.com/users/RIOT-OS/following{/other_user}","gists_url":"https://api.github.com/users/RIOT-OS/gists{/gist_id}","starred_url":"https://api.github.com/users/RIOT-OS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIOT-OS/subscriptions","organizations_url":"https://api.github.com/users/RIOT-OS/orgs","repos_url":"https://api.github.com/users/RIOT-OS/repos","events_url":"https://api.github.com/users/RIOT-OS/events{/privacy}","received_events_url":"https://api.github.com/users/RIOT-OS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RIOT-OS/RIOT","description":"RIOT -  The friendly OS for IoT","fork":false,"url":"https://api.github.com/repos/RIOT-OS/RIOT","forks_url":"https://api.github.com/repos/RIOT-OS/RIOT/forks","keys_url":"https://api.github.com/repos/RIOT-OS/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RIOT-OS/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RIOT-OS/RIOT/teams","hooks_url":"https://api.github.com/repos/RIOT-OS/RIOT/hooks","issue_events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/events","assignees_url":"https://api.github.com/repos/RIOT-OS/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/RIOT-OS/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/RIOT-OS/RIOT/tags","blobs_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/RIOT-OS/RIOT/languages","stargazers_url":"https://api.github.com/repos/RIOT-OS/RIOT/stargazers","contributors_url":"https://api.github.com/repos/RIOT-OS/RIOT/contributors","subscribers_url":"https://api.github.com/repos/RIOT-OS/RIOT/subscribers","subscription_url":"https://api.github.com/repos/RIOT-OS/RIOT/subscription","commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/RIOT-OS/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/RIOT-OS/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RIOT-OS/RIOT/merges","archive_url":"https://api.github.com/repos/RIOT-OS/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RIOT-OS/RIOT/downloads","issues_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/RIOT-OS/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/RIOT-OS/RIOT/releases{/id}","deployments_url":"https://api.github.com/repos/RIOT-OS/RIOT/deployments","created_at":"2012-12-29T20:38:40Z","updated_at":"2016-03-23T05:51:26Z","pushed_at":"2016-03-23T10:41:40Z","git_url":"git://github.com/RIOT-OS/RIOT.git","ssh_url":"git@github.com:RIOT-OS/RIOT.git","clone_url":"https://github.com/RIOT-OS/RIOT.git","svn_url":"https://github.com/RIOT-OS/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":86988,"stargazers_count":714,"watchers_count":714,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":526,"mirror_url":null,"open_issues_count":459,"forks":526,"open_issues":459,"watchers":714,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5141"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/5141"},"issue":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5141"},"comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5141/comments"},"review_comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5141/comments"},"review_comment":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/5141/commits"},"statuses":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/eae0e4c724df65d33f45696ba74dc2c791b07f12"}}}}