Message ID | 1601386397-21067-1-git-send-email-loic.poulain@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | [1/2] net: qrtr: Allow forwarded services | expand |
On Tue 29 Sep 08:33 CDT 2020, Loic Poulain wrote: > 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> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Regards, Bjorn > --- > 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 >
On Tue, Sep 29, 2020 at 03:33:16PM +0200, Loic Poulain wrote: > 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> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Thanks, Mani > --- > 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 >
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;
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(-)