summaryrefslogtreecommitdiff
path: root/zebra/ipforward_solaris.c
diff options
context:
space:
mode:
authorajs <ajs>2005-01-29 17:07:40 +0000
committerajs <ajs>2005-01-29 17:07:40 +0000
commit4460e7a4cf3dadcd9f06e4b519ba7be2cc936c0a (patch)
tree5755c13aeffb151d56a886868e623d186ca9a0a0 /zebra/ipforward_solaris.c
parent4be019d5530e21c9e54e41e46a57ab071b9b11ae (diff)
2005-01-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* if_ioctl_solaris.c: (interface_list_ioctl) Save errno before calling zserv_privs.change. * ioctl{,_solaris}.c: (if_ioctl,if_ioctl_ipv6) Save errno before calling zserv_privs.change. * ipforward_solaris.c: (solaris_nd) Save errno before calling zserv_privs.change. * irdp_main.c: (irdp_sock_init) Save errno before calling zserv_privs.change. [backport candidate]
Diffstat (limited to 'zebra/ipforward_solaris.c')
-rw-r--r--zebra/ipforward_solaris.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/zebra/ipforward_solaris.c b/zebra/ipforward_solaris.c
index 2eaf3416..3ad2c400 100644
--- a/zebra/ipforward_solaris.c
+++ b/zebra/ipforward_solaris.c
@@ -87,10 +87,12 @@ solaris_nd(const int cmd, const char* parameter, const int value)
}
if (ioctl (fd, I_STR, &strioctl) < 0)
{
+ int save_errno = errno;
if ( zserv_privs.change (ZPRIVS_LOWER) )
zlog_err ("solaris_nd: Can't lower privileges");
close (fd);
- zlog_warn("ioctl I_STR failed on device %s - %s", device,safe_strerror(errno));
+ zlog_warn("ioctl I_STR failed on device %s - %s",
+ device, safe_strerror(save_errno));
return -1;
}
close(fd);