While debugging Kuznetsov's tcpdump, I noticed that SIOCGIFNAME returns bogus data. Attached program exercises the problem.
Davem, any comment on this one?