Skip to contentSkip to conversation

RTNETLINK (long reply)

LARTC Michael T. Babcock 1 participant 1 message Nov 27, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · Whit Blauvelt
Quoted 1 line

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.

Quoted 1 line

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.

Quoted 2 lines

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.

Signature · 7 lines
Michael T. Babcock
CTO, FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/