[radvd-devel-l] Debian Bug#287863

Andreas Rottmann a.rottmann at gmx.at
Fri Feb 11 11:38:44 EST 2005


Hi!

It would be nice if you could take a look at this bug. Quoting from
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=287863:

,----
| I started to investigate the source and found out, that it hangs up while 
| parsing /proc/net/igmp6 in device.c:186
| It expects a 4-byte decimal integer, but in fact my /proc/net/igmp6 has even 
                 ^^^^
| 5-byte numbers:
    ^^^
    he means character here
| 
| 1    lo              ff020000000000000000000000000001     1 0000000C 0
| 2    eth0            ff0200000000000000000001ff000000     1 00000004 0
| 2    eth0            ff0200000000000000000001ff83e5b4     1 00000004 0
| 2    eth0            ff020000000000000000000000000002     1 00000004 0
| 2    eth0            ff020000000000000000000000000001     1 0000000C 0
| 3    eth1            ff0200000000000000000001ff000000     1 00000004 0
| 3    eth1            ff0200000000000000000001ff022511     1 00000004 0
| 3    eth1            ff020000000000000000000000000002     2 00000004 0
| 3    eth1            ff020000000000000000000000000001     1 0000000C 0
| 10   sit0            ff020000000000000000000000000001     1 00000008 0
| 12502 tun0            ff020000000000000000000000000001     1 0000000C 0
| 12503 ppp0            ff020000000000000000000000000001     1 0000000C 0
| 12505 tun6to4         ff020000000000000000000000000001     1 0000000C 0
| 
| So i changed the 4 into a 5 and it does not hang up now, but it still fails 
| sending the advertisments:
`----

,----
| So this would be the patch for device.c:
| 
| 186c186
| <       while ( (ret=fscanf(fp, "%4u %*s %32[0-9A-Fa-f] %*x %*x %*x\n", 
| &if_idx, addr)) != EOF) {
| ---
| >       while ( (ret=fscanf(fp, "%5u %*s %32[0-9A-Fa-f] %*x %*x %*x\n", 
| &if_idx, addr)) != EOF) {
`----

IMO, it would make sense to drop the width completely, making it "%u
%*s %32[...". What do you think?

On the sendmsg issue, I'm trying to get an strace from the submitter.

Regards, Rotty
-- 
Andreas Rottmann         | Rotty at ICQ      | 118634484 at ICQ | a.rottmann at gmx.at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

A. Because it breaks the logical sequence of discussion
Q. Why is top posting bad?



More information about the radvd-devel-l mailing list