summaryrefslogtreecommitdiff
path: root/net/qrtr
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@linaro.org>2020-11-06 18:33:27 +0100
committerJakub Kicinski <kuba@kernel.org>2020-11-11 15:29:34 -0800
commit87f547c108e4a12c3284ca8298d2d81a371f840e (patch)
treed2b6a883aafe70cc795861943c6c62b5a5eeebb4 /net/qrtr
parentae068f561baa003d260475c3e441ca454b186726 (diff)
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>
Diffstat (limited to 'net/qrtr')
-rw-r--r--net/qrtr/ns.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/net/qrtr/ns.c b/net/qrtr/ns.c
index b8559c882431..56aaf8cb6527 100644
--- a/net/qrtr/ns.c
+++ b/net/qrtr/ns.c
@@ -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;