ifdata doesn't support long device names
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
moreutils (Debian) |
Fix Released
|
Unknown
|
|||
moreutils (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: moreutils
alan@hactar:~$ ifdata -sib wlan0
Invalid data read, check!
Error getting statistics for wlan0
alan@hactar:~$ cat /proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo: 51332 644 0 0 0 0 0 0 51332 644 0 0 0 0 0 0
eth0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
wmaster0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
wlan0:91263412 82099 0 0 0 0 0 0 8292238 65428 0 0 0 0 0 0
vboxnet0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
pan0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
This is due to the check on the field length of the device not being long enough. wmaster0 is more than 6 chars.
*** moreutils/ifdata.c 2008-02-02 22:00:53.000000000 +0000
--- moreutils-
***************
*** 246,252 ****
do {
int items = fscanf(fd,
! " %6[^:]:%llu %llu %llu %llu %llu %llu %llu %llu "
"%llu %llu %llu %llu %llu %llu %llu %llu",
name,
&ifstat-
--- 246,252 ----
do {
int items = fscanf(fd,
! " %20[^:]:%llu %llu %llu %llu %llu %llu %llu %llu "
"%llu %llu %llu %llu %llu %llu %llu %llu",
name,
&ifstat-
ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: moreutils 0.34
ProcEnviron:
PATH=(custom, user)
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: moreutils
Uname: Linux 2.6.28-11-generic i686
Changed in moreutils (Debian): | |
status: | Unknown → Fix Committed |
Changed in moreutils (Debian): | |
status: | Fix Committed → Fix Released |
Hope this patch works out ok.