{"action":"closed","issue":{"url":"https://api.github.com/repos/contiki-os/contiki/issues/1106","labels_url":"https://api.github.com/repos/contiki-os/contiki/issues/1106/labels{/name}","comments_url":"https://api.github.com/repos/contiki-os/contiki/issues/1106/comments","events_url":"https://api.github.com/repos/contiki-os/contiki/issues/1106/events","html_url":"https://github.com/contiki-os/contiki/issues/1106","id":86600700,"number":1106,"title":"icmpv6 messages are forwarded by error","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},"labels":[{"url":"https://api.github.com/repos/contiki-os/contiki/labels/Core","name":"Core","color":"5319e7"},{"url":"https://api.github.com/repos/contiki-os/contiki/labels/RPL","name":"RPL","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-09T13:30:33Z","updated_at":"2015-08-27T11:02:39Z","closed_at":"2015-08-27T11:02:39Z","body":"The code managing the icmpv6 packets in uip6.c requires that the handler set uip_len to 0 when it does not have to send a reply packet.\r\n\r\n```\r\n  /*\r\n   * Search generic input handlers.\r\n   * The handler is in charge of setting uip_len to 0\r\n   */\r\n```\r\n\r\nHowever, the DIO and DAO handlers simply return when an invalid message or option is received (e.g. DAO with invalid rank or from an unknown DAG). As uip_len is not set, the stack tries to send the packet again, resulting of the sending of a NS message, with target set to the host own IP, to resolve the destination address.\r\n\r\nEither we should add a call to uip_clear_buf() as proposed in #927 or change the behavior of the imp management code and force uip_len to zero when the handler returns. If a reply must be sent, then the handler should instead call uip_icmp6_send()."}}