Skip to content

Commit 274eede

Browse files
committed
net: shell: Fix neighbor printing for IEEE 802.15.4 networks
The "net nbr" command was printing the heading of neighbor list incorrectly. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 177380e commit 274eede

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

subsys/net/ip/net_shell.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1393,8 +1393,14 @@ static void nbr_cb(struct net_nbr *nbr, void *user_data)
13931393
int *count = user_data;
13941394

13951395
if (*count == 0) {
1396+
char *padding = "";
1397+
1398+
if (net_nbr_get_lladdr(nbr->idx)->len == 8) {
1399+
padding = " ";
1400+
}
1401+
13961402
printk(" Neighbor Flags Interface State\t"
1397-
"Remain\tLink Address\n");
1403+
"Remain\tLink %sAddress\n", padding);
13981404
}
13991405

14001406
(*count)++;

0 commit comments

Comments
 (0)