mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
net: qrtr: Allow forwarded services
A remote endpoint (immediate neighbors node) can forward services from other nodes (non-immadiate), in that case ctrl packet node ID (offering distant service) can differ from the qrtr source node (forwarding the packet). Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
ae068f561b
commit
87f547c108
@ -517,10 +517,6 @@ static int ctrl_cmd_new_server(struct sockaddr_qrtr *from,
|
||||
port = from->sq_port;
|
||||
}
|
||||
|
||||
/* Don't accept spoofed messages */
|
||||
if (from->sq_node != node_id)
|
||||
return -EINVAL;
|
||||
|
||||
srv = server_add(service, instance, node_id, port);
|
||||
if (!srv)
|
||||
return -EINVAL;
|
||||
@ -559,10 +555,6 @@ static int ctrl_cmd_del_server(struct sockaddr_qrtr *from,
|
||||
port = from->sq_port;
|
||||
}
|
||||
|
||||
/* Don't accept spoofed messages */
|
||||
if (from->sq_node != node_id)
|
||||
return -EINVAL;
|
||||
|
||||
/* Local servers may only unregister themselves */
|
||||
if (from->sq_node == qrtr_ns.local_node && from->sq_port != port)
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user