netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] net: qrtr: Allow forwarded services
@ 2020-09-29 13:33 Loic Poulain
  2020-09-29 13:33 ` [PATCH 2/2] net: qrtr: Allow non-immediate node routing Loic Poulain
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Loic Poulain @ 2020-09-29 13:33 UTC (permalink / raw)
  To: bjorn.andersson, davem; +Cc: netdev, clew, manivannan.sadhasivam, Loic Poulain

A remote endpoint (immediate neighbor node) can forward services
from other non-immediate nodes, 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>
---
 net/qrtr/ns.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/net/qrtr/ns.c b/net/qrtr/ns.c
index d8252fd..d542d8f 100644
--- a/net/qrtr/ns.c
+++ b/net/qrtr/ns.c
@@ -469,10 +469,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;
@@ -511,10 +507,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;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-01 13:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-29 13:33 [PATCH 1/2] net: qrtr: Allow forwarded services Loic Poulain
2020-09-29 13:33 ` [PATCH 2/2] net: qrtr: Allow non-immediate node routing Loic Poulain
2020-09-29 14:41   ` Bjorn Andersson
2020-09-29 15:55   ` Jakub Kicinski
2020-09-29 14:34 ` [PATCH 1/2] net: qrtr: Allow forwarded services Bjorn Andersson
2020-10-01 13:26 ` Manivannan Sadhasivam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).