{"action":"opened","issue":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/11731","repository_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr","labels_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/11731/labels{/name}","comments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/11731/comments","events_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/11731/events","html_url":"https://github.com/zephyrproject-rtos/zephyr/issues/11731","id":385682815,"node_id":"MDU6SXNzdWUzODU2ODI4MTU=","number":11731,"title":"Mesh friend doesn't forward packets to LPNs non-primary elements","user":{"login":"trond-snekvik","id":7857838,"node_id":"MDQ6VXNlcjc4NTc4Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/7857838?v=4","gravatar_id":"","url":"https://api.github.com/users/trond-snekvik","html_url":"https://github.com/trond-snekvik","followers_url":"https://api.github.com/users/trond-snekvik/followers","following_url":"https://api.github.com/users/trond-snekvik/following{/other_user}","gists_url":"https://api.github.com/users/trond-snekvik/gists{/gist_id}","starred_url":"https://api.github.com/users/trond-snekvik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trond-snekvik/subscriptions","organizations_url":"https://api.github.com/users/trond-snekvik/orgs","repos_url":"https://api.github.com/users/trond-snekvik/repos","events_url":"https://api.github.com/users/trond-snekvik/events{/privacy}","received_events_url":"https://api.github.com/users/trond-snekvik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-29T11:07:22Z","updated_at":"2018-11-29T11:07:22Z","closed_at":null,"author_association":"NONE","body":"The Zephyr BT Mesh friend only forwards packets that \r\n1. have their destination in the LPN's subscription list \r\nor \r\n2. [Are destined for the first element in the LPN.](https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/mesh/friend.c#L1193)\r\n\r\nThis makes the friend queue reject packets that are supposed to go to non-primary elements. The friend module needs to store the LPNs element count in addition to its primary address when the friend request comes in, and take this into account when matching addresses for the LPN.\r\n\r\n**To Reproduce**\r\nMake an LPN node with more than one element connect to the friend, and try to send a message from the friend to the LPN's second element. It'll fail [the check on line 1193](https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/mesh/friend.c#L1193) and reject the message.\r\n\r\n**Expected behavior**\r\nAccording to section 3.5.5 of the spec, the friend should forward packets destined for all the elements on the LPN node. \r\n\r\n**Impact**\r\nCan't publish to models that aren't in the primary element\r\n"}}
{"actor":{"display_login":"trond-snekvik"}}