[PATCH v1 07/10] j1939: transport add warning for j1939_xtp_rx_rts_old()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For some reasons we are trying to set addr.da and addr.sa
on rx path. It looks weird, so add for now warning, if we really
have a situation which should be covered probably in other place.

Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
---
 net/can/j1939/transport.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c
index 7652e129c804..437124e87b59 100644
--- a/net/can/j1939/transport.c
+++ b/net/can/j1939/transport.c
@@ -1054,6 +1054,12 @@ static int j1939_xtp_rx_rts_old(struct j1939_session *session,
 		return -EBUSY;
 	}
 
+	if (session->skcb->addr.sa != skcb->addr.sa ||
+	    session->skcb->addr.da != skcb->addr.da)
+		netdev_warn(priv->ndev, "%s: session->skcb->addr.sa=0x%02x skcb->addr.sa=0x%02x session->skcb->addr.da=0x%02x skcb->addr.da=0x%02x\n",
+			    __func__,
+			    session->skcb->addr.sa, skcb->addr.sa,
+			    session->skcb->addr.da, skcb->addr.da);
 	/* make sure 'sa' & 'da' are correct !
 	 * They may be 'not filled in yet' for sending
 	 * skb's, since they did not pass the Address Claim ever.
-- 
2.19.1




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux