net: qrtr: Add node assignment on new server
The remote processor will not forward a hello packet for the other processors that it is forwarding from. Discover nodes through QRTR_TYPE_NEW_SERVER messages as well in order to find remote hosts which require more than one hop to reach it. Change-Id: Ia79df1fa2730250786d221fb847029046a53bea4 Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org> Signed-off-by: Chris Lew <clew@codeaurora.org>
This commit is contained in:
parent
5afd5bc51d
commit
b92521c119
@ -475,6 +475,7 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len)
|
||||
struct qrtr_node *node = ep->node;
|
||||
const struct qrtr_hdr_v1 *v1;
|
||||
const struct qrtr_hdr_v2 *v2;
|
||||
struct qrtr_ctrl_pkt *pkt;
|
||||
struct qrtr_sock *ipc;
|
||||
struct sk_buff *skb;
|
||||
struct qrtr_cb *cb;
|
||||
@ -545,6 +546,10 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len)
|
||||
skb_store_bits(skb, 0, data + hdrlen, size);
|
||||
|
||||
qrtr_node_assign(node, cb->src_node);
|
||||
if (cb->type == QRTR_TYPE_NEW_SERVER) {
|
||||
pkt = (void *)data + hdrlen;
|
||||
qrtr_node_assign(node, le32_to_cpu(pkt->server.node));
|
||||
}
|
||||
|
||||
if (cb->type == QRTR_TYPE_RESUME_TX) {
|
||||
qrtr_tx_resume(node, skb);
|
||||
|
Loading…
Reference in New Issue
Block a user