net: shell: conn: Print packet socket information correctly
The "net conn" command printed AF_PACKET socket as AF_UNK(3). Fix this by printing "AF_PACKET" in this case. Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit is contained in:
parent
514cdd6b3a
commit
57c452fb79
1 changed files with 2 additions and 0 deletions
|
@ -89,6 +89,8 @@ static void conn_handler_cb(struct net_conn *conn, void *user_data)
|
|||
|
||||
} else if (conn->local_addr.sa_family == AF_UNSPEC) {
|
||||
snprintk(addr_local, sizeof(addr_local), "AF_UNSPEC");
|
||||
} else if (conn->local_addr.sa_family == AF_PACKET) {
|
||||
snprintk(addr_local, sizeof(addr_local), "AF_PACKET");
|
||||
} else {
|
||||
snprintk(addr_local, sizeof(addr_local), "AF_UNK(%d)",
|
||||
conn->local_addr.sa_family);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue