Skip to content
Permalink
Browse files

net: shell: Print connection information properly for AF_CAN

CANBUS socket information was just printing unknown information.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
  • Loading branch information...
jukkar committed Feb 27, 2019
1 parent 0032f68 commit 1e98928424c538204a8388f104aa183d89dd9a30
Showing with 5 additions and 0 deletions.
  1. +5 −0 subsys/net/ip/net_shell.c
@@ -935,6 +935,11 @@ static void conn_handler_cb(struct net_conn *conn, void *user_data)
&net_sin(&conn->remote_addr)->sin_addr),
ntohs(net_sin(&conn->remote_addr)->sin_port));
} else
#endif
#ifdef CONFIG_NET_L2_CANBUS
if (conn->local_addr.sa_family == AF_CAN) {
snprintk(addr_local, sizeof(addr_local), "-");
} else
#endif
if (conn->local_addr.sa_family == AF_UNSPEC) {
snprintk(addr_local, sizeof(addr_local), "AF_UNSPEC");

0 comments on commit 1e98928

Please sign in to comment.
You can’t perform that action at this time.