]> git.ipfire.org Git - thirdparty/iproute2.git/commit
iproute: Fix errno propagation from rtnl_talk
authorPavel Emelyanov <xemul@parallels.com>
Mon, 20 Aug 2012 08:08:40 +0000 (12:08 +0400)
committerStephen Hemminger <shemminger@vyatta.com>
Mon, 20 Aug 2012 19:54:48 +0000 (12:54 -0700)
commitb8cf1e9ae3d5e5ec17e79c0876755594770952b7
tree35d0c5bbc6caf33323f3a2b3ca307a20a369c8a8
parentd89fbf3223ec6909835a28bdab6880158e18354b
iproute: Fix errno propagation from rtnl_talk

Callers of rtnl_talk check errno value for their needs. In particular, the addrs
and routes restoring code validly reports success if the EEXISTS is in there.

However, the errno value can be sometimes screwed up by the perror call. Thus
we should only set it _after_ the message was emitted.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
lib/libnetlink.c