question about netlink/rtnetlink sockets

Christopher Friesen (cfriesen@nortelnetworks.com)
Thu, 30 Aug 2001 11:29:29 -0400


I'm working on writing some code that talks to the kernel over a netlink socket
and manipulates IP addresses, rules, and routes.

I've gotten it working, except for the case of adding an address that is already
present. I would like to either ignore or replace it if it is already there
(haven't decided which yet) but currently I get an EEXIST error. (Which is
understandable, but I'd like to get rid of it.) I tried setting the
NLM_F_REPLACE flag (which works when trying to add a route that already exists)
but this didn't seem to do anything. Neither did NLM_F_EXCL.

Is this the expected behaviour? Is there some reason why we don't replace it
with the newly specified address? If there is no serious reason, could you
point me towards the code controlling this? I'm on 2.2.

Thanks,

Chris

-- 
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com
-
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/