mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
net: qrtr: Handle IPCR control port format of older targets
The destination port value in the IPCR control buffer on older targets is 0xFFFF. Handle the same by updating the dst_port to QRTR_PORT_CTRL. Signed-off-by: Vignesh Viswanathan <quic_viswanat@quicinc.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f26b32ef2f
commit
69940b888e
1 changed files with 5 additions and 0 deletions
|
@ -23,6 +23,8 @@
|
||||||
#define QRTR_EPH_PORT_RANGE \
|
#define QRTR_EPH_PORT_RANGE \
|
||||||
XA_LIMIT(QRTR_MIN_EPH_SOCKET, QRTR_MAX_EPH_SOCKET)
|
XA_LIMIT(QRTR_MIN_EPH_SOCKET, QRTR_MAX_EPH_SOCKET)
|
||||||
|
|
||||||
|
#define QRTR_PORT_CTRL_LEGACY 0xffff
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct qrtr_hdr_v1 - (I|R)PCrouter packet header version 1
|
* struct qrtr_hdr_v1 - (I|R)PCrouter packet header version 1
|
||||||
* @version: protocol version
|
* @version: protocol version
|
||||||
|
@ -495,6 +497,9 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cb->dst_port == QRTR_PORT_CTRL_LEGACY)
|
||||||
|
cb->dst_port = QRTR_PORT_CTRL;
|
||||||
|
|
||||||
if (!size || len != ALIGN(size, 4) + hdrlen)
|
if (!size || len != ALIGN(size, 4) + hdrlen)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue