Bug 1795

Summary: ifconfig trunclate long interface names
Product: Busybox Reporter: Evgeniy Manachkin <sfstudio>
Component: NetworkingAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.16.x   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: Target:
Build:

Description Evgeniy Manachkin 2010-05-20 22:49:49 UTC
~ # ifconfig -a wlan0-vap0
wlan0-vap Link encap:Ethernet  HWaddr 00:0B:2B:3C:33:38  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

~ # ip link show wlan0-vap0
8: wlan0-vap0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:0b:2b:3c:33:38 brd ff:ff:ff:ff:ff:ff

wlan0-vap0 is true name. wlan0-vap - cut symbol at end. What fix ?

Short name as eth0 show OK Trouble only long interface names.
Comment 1 Mike Frysinger 2010-05-21 06:44:04 UTC
run ifconfig through strace and post the log as an attachment
Comment 2 Evgeniy Manachkin 2010-05-21 08:20:17 UTC
(In reply to comment #1)
> run ifconfig through strace and post the log as an attachment

strace and others debugger is large to load at my device. Sorry.
Comment 3 Mike Frysinger 2010-05-21 08:24:13 UTC
copy it into a ramfs partition, or use a nfs mount.  there are plenty of ways of doing this kind of thing (ignoring that strace is pretty small).
Comment 4 Evgeniy Manachkin 2010-05-21 09:20:31 UTC
(In reply to comment #3)
> copy it into a ramfs partition, or use a nfs mount.  there are plenty of ways
> of doing this kind of thing (ignoring that strace is pretty small).

The captain evidence. =)))))  In my device 4Mb of ram, and 2Mb flah. free ram ~100-200kb at every time $(
Comment 5 Denys Vlasenko 2010-05-23 21:03:52 UTC
Fix is trivial: in networking/interface.c:

-       printf("%-9.9s Link encap:%s  ", ptr->name, hw->title);
+       printf("%-9s Link encap:%s  ", ptr->name, hw->title);

I will fix it in git now.

Thanks for reporting!