Skip to content

Commit

Permalink
net: shell: Print mgmt socket information properly
Browse files Browse the repository at this point in the history
The "net sockets" command did not print network management
socket information properly but claimed that the socket
was IPv4 one which it is not.

Signed-off-by: Jukka Rissanen <[email protected]>
  • Loading branch information
jukkar authored and aescolar committed Feb 28, 2024
1 parent afa4b4a commit bdfcc75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subsys/net/lib/shell/sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ int walk_sockets(struct k_obj_core *obj_core, void *user_data)
PR("%25s %-12s %c%c%c\t%-5s%-13d %-10" PRId64 "%-10" PRId64 "\n",
thread_name, obj->reg->name,
obj->socket_family == AF_INET6 ? '6' :
(obj->socket_family ? '4' : ' '),
(obj->socket_family == AF_INET ? '4' :
(obj->socket_family == AF_NET_MGMT ? 'M' : ' ')),
obj->socket_type == SOCK_DGRAM ? 'D' :
(obj->socket_type == SOCK_STREAM ? 'S' :
(obj->socket_type == SOCK_RAW ? 'R' : ' ')),
Expand Down

0 comments on commit bdfcc75

Please sign in to comment.