From bf77ef2d638d7b9e1735a13a0f4c07ac3bb34d91 Mon Sep 17 00:00:00 2001 From: Chris Lew Date: Tue, 11 Oct 2022 13:32:07 -0700 Subject: [PATCH] net: qrtr: Return success if control port is not bound If a port tries to send a message before the name service binds to the control port, then that message should succeed. This will allow clients to operate normally until the name service comes online and causes a net reset to restart all the ports. Change-Id: Ica0a5e45df0e51f282e5bf426d11ff8e41b339c4 Signed-off-by: Chris Lew --- net/qrtr/af_qrtr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/qrtr/af_qrtr.c b/net/qrtr/af_qrtr.c index 27e3785c8596..90c6c188eea7 100644 --- a/net/qrtr/af_qrtr.c +++ b/net/qrtr/af_qrtr.c @@ -980,6 +980,10 @@ static int qrtr_local_enqueue(struct qrtr_node *node, struct sk_buff *skb, struct sock *sk = skb->sk; ipc = qrtr_port_lookup(to->sq_port); + if (!ipc && to->sq_port == QRTR_PORT_CTRL) { + kfree_skb(skb); + return 0; + } if (!ipc || &ipc->sk == skb->sk) { /* do not send to self */ if (ipc) qrtr_port_put(ipc);