Re: [LARTC] RTNETLINK (long reply)

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 26, 2001 at 08:12:44PM -0500, Whit Blauvelt wrote:
> > RTNETLINK answers: File exists
> 
> Let me be clear about this: anything that can be deleted, should be able to
> be added. The "File exists" message is quite wrong, since no file creation

The message text is wrong, but it you need to first understand that 
most things in Unix are treated like files, whether you realise it or 
not.  Shared memory is now treated like a set of files even and when 
you fail to create an 'object' (using a file descriptor), you get an 
error number 17 (from errno.h) which is defined as EEXIST or "File 
exists".  If the author of the code simply requested the text for the 
error message in question, "File exists" is what would be returned (do 
a man strerror or perror).

In this particular case, and probably others, the code could be edited 
to specifically handle the EEXIST condition and instead return 
"RTNETLINK answers: Route exists".  Also, the code returning this error 
should only return the error if in fact the route already exists.  If 
it can't be created for another reason, a different error should be 
returned.

> Has Linus really allowed such nonsense to be integrated with the kernel?

Do you read C code?  If not, Linus' decisions are probably quite far 
from your grasp.  I appreciate your problem understanding the error in 
question, but its quite obvious to people who work with this code all 
the time, even though it should probably be revised to be friendly to 
others as well.

> if the implementation is this lame, it shouldn't have been integrated at
> all.

That's your call.  I understand for the most part it so I'm much 
happier having it integrated than not.
-- 
Michael T. Babcock
CTO, FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock/



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux