lkml.org 
[lkml]   [2010]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectFwd: Question about SIOCGIFCONF
From
---------- Forwarded message ----------
From: Jeffrey Merkey <jeffmerkey@gmail.com>
Date: Fri, May 28, 2010 at 3:57 PM
Subject: Re: Question about SIOCGIFCONF
To: Eric Dumazet <eric.dumazet@gmail.com>


Not a bad suggestion, however, redhat and all the major distros still
use ifconfig.   Do you think this should be fixed or is it a
non-issue?

Jeff

On Fri, May 28, 2010 at 2:06 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le vendredi 28 mai 2010 à 13:05 -0600, Jeffrey Merkey a écrit :
>> The code in question is net-tools/lib/interface.c function
>> if_readproc() and associated routines.  Looks like a hole.
>>
>> Jeff
>>
>> On Fri, May 28, 2010 at 1:02 PM, Jeffrey Merkey <jeffmerkey@gmail.com> wrote:
>> > Review of the net-tools source code for IFCONFIG indicates that when
>> > /proc is not loaded and/or /proc/net/dev is not available, IFCONFIG
>> > will attempt to use this ioctl to determine which interfaces are
>> > present in the system.  Since the ioctl will not report unbound
>> > interfaces which are active, IFCONFIG will not properly report or
>> > detect network adapters which are unbound.  This seems to be a hole,
>> > although most of the time I assume /proc will always be mounted.
>> > Someone should review this and make a decision as to whether or not
>> > this could be a problem.  At any rate, it does not work as advertised.
>> >
>
> Maybe you could forget about a 20 years old legacy program and use the
> real thing : ip
>
> ip link
> ip addr
> ...
>
> Alternatively, you could rewrite ifconfig to use modern API.
>
> (Not depending on /proc , at all)
>
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-05-29 00:03    [W:0.044 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site