net: rpl: Update RPL header
Empty RPL HBH header will be inserted while finalizing IPv6 packet but updated after finding nexthop and sent the packet. In case of Bluetooth or multicast dst address it was missed. Resulted in empty RPL HBH header and packet dropped at peer node. It should be updated in all circumstances. Jira: ZEP-2088 Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This commit is contained in:
parent
2e2ce3120a
commit
4a8a42f9dd
1 changed files with 12 additions and 0 deletions
|
@ -855,11 +855,23 @@ struct net_pkt *net_ipv6_prepare_for_send(struct net_pkt *pkt)
|
|||
* https://jira.zephyrproject.org/browse/ZEP-1656
|
||||
*/
|
||||
if (atomic_test_bit(net_pkt_iface(pkt)->flags, NET_IF_POINTOPOINT)) {
|
||||
/* Update RPL header */
|
||||
if (net_rpl_update_header(pkt, &NET_IPV6_HDR(pkt)->dst) < 0) {
|
||||
net_pkt_unref(pkt);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return pkt;
|
||||
}
|
||||
|
||||
if (net_pkt_ll_dst(pkt)->addr ||
|
||||
net_is_ipv6_addr_mcast(&NET_IPV6_HDR(pkt)->dst)) {
|
||||
/* Update RPL header */
|
||||
if (net_rpl_update_header(pkt, &NET_IPV6_HDR(pkt)->dst) < 0) {
|
||||
net_pkt_unref(pkt);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return update_ll_reserve(pkt, &NET_IPV6_HDR(pkt)->dst);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue