{"action":"created","issue":{"url":"https://api.github.com/repos/contiki-os/contiki/issues/927","labels_url":"https://api.github.com/repos/contiki-os/contiki/issues/927/labels{/name}","comments_url":"https://api.github.com/repos/contiki-os/contiki/issues/927/comments","events_url":"https://api.github.com/repos/contiki-os/contiki/issues/927/events","html_url":"https://github.com/contiki-os/contiki/pull/927","id":52534702,"number":927,"title":"Fix: set uip_ext_len to 0 after dropping packet","user":{"login":"siskin","id":630525,"avatar_url":"https://avatars.githubusercontent.com/u/630525?v=3","gravatar_id":"","url":"https://api.github.com/users/siskin","html_url":"https://github.com/siskin","followers_url":"https://api.github.com/users/siskin/followers","following_url":"https://api.github.com/users/siskin/following{/other_user}","gists_url":"https://api.github.com/users/siskin/gists{/gist_id}","starred_url":"https://api.github.com/users/siskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siskin/subscriptions","organizations_url":"https://api.github.com/users/siskin/orgs","repos_url":"https://api.github.com/users/siskin/repos","events_url":"https://api.github.com/users/siskin/events{/privacy}","received_events_url":"https://api.github.com/users/siskin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/contiki-os/contiki/labels/Core","name":"Core","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-12-19T22:14:17Z","updated_at":"2015-05-21T19:49:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/contiki-os/contiki/pulls/927","html_url":"https://github.com/contiki-os/contiki/pull/927","diff_url":"https://github.com/contiki-os/contiki/pull/927.diff","patch_url":"https://github.com/contiki-os/contiki/pull/927.patch"},"body":"###### Bug description:\r\nIf outgoing packet with hop-by-hop header is dropped in `tcpip_ipv6_output()` function, uip_ext_len is not set to 0. It causes next packet with no hop-by-hop header (for example ICMP) to become corrupt. Bug can be easily observed with ipv6/rpl-udp example client. If client looses connection with parrent, some outgoing DIO messages become corrupt (depending on the frequency of outgoing UDP messages). \r\n\r\n###### Fix description:\r\nIssue can be solved by adding:\r\n```\r\nuip_ext_len = 0;\r\n```\r\nbefore every return statement in `tcpip_ipv6_output()`. \r\n\r\nAfter comment on mailing list from Laurent Deru, `uip_ext_len = 0` is also added in other places where packet is discarded."},"comment":{"url":"https://api.github.com/repos/contiki-os/contiki/issues/comments/104401547","html_url":"https://github.com/contiki-os/contiki/pull/927#issuecomment-104401547","issue_url":"https://api.github.com/repos/contiki-os/contiki/issues/927","id":104401547,"user":{"login":"laurentderu","id":3338530,"avatar_url":"https://avatars.githubusercontent.com/u/3338530?v=3","gravatar_id":"","url":"https://api.github.com/users/laurentderu","html_url":"https://github.com/laurentderu","followers_url":"https://api.github.com/users/laurentderu/followers","following_url":"https://api.github.com/users/laurentderu/following{/other_user}","gists_url":"https://api.github.com/users/laurentderu/gists{/gist_id}","starred_url":"https://api.github.com/users/laurentderu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurentderu/subscriptions","organizations_url":"https://api.github.com/users/laurentderu/orgs","repos_url":"https://api.github.com/users/laurentderu/repos","events_url":"https://api.github.com/users/laurentderu/events{/privacy}","received_events_url":"https://api.github.com/users/laurentderu/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T19:49:38Z","updated_at":"2015-05-21T19:49:38Z","body":"+1 for uip_clear_buf(), that will help to always reset the variables."}}