summaryrefslogtreecommitdiff
path: root/ripngd
diff options
context:
space:
mode:
authorajs <ajs>2004-11-20 02:06:59 +0000
committerajs <ajs>2004-11-20 02:06:59 +0000
commit6099b3b56956322567323c11fd698b2328c6826b (patch)
treefa537bd0eaa9f7d824f39445eabc928db59050ca /ripngd
parentae5e24d8678f1e3a60dde58d3382c5ba73d6bb27 (diff)
2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* global: Replace strerror with safe_strerror. And vtysh/vtysh.c needs to include "log.h" to pick up the declaration.
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripng_interface.c4
-rw-r--r--ripngd/ripngd.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index f5467f97..a7c9cefb 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -94,7 +94,7 @@ ripng_multicast_join (struct interface *ifp)
}
if (ret < 0)
- zlog_warn ("can't setsockopt IPV6_JOIN_GROUP: %s", strerror (errno));
+ zlog_warn ("can't setsockopt IPV6_JOIN_GROUP: %s", safe_strerror (errno));
if (IS_RIPNG_DEBUG_EVENT)
zlog_info ("RIPng %s join to all-rip-routers multicast group", ifp->name);
@@ -120,7 +120,7 @@ ripng_multicast_leave (struct interface *ifp)
ret = setsockopt (ripng->sock, IPPROTO_IPV6, IPV6_LEAVE_GROUP,
(char *) &mreq, sizeof (mreq));
if (ret < 0)
- zlog_warn ("can't setsockopt IPV6_LEAVE_GROUP: %s\n", strerror (errno));
+ zlog_warn ("can't setsockopt IPV6_LEAVE_GROUP: %s\n", safe_strerror (errno));
if (IS_RIPNG_DEBUG_EVENT)
zlog_info ("RIPng %s leave from all-rip-routers multicast group",
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index edf959fa..5d5c25d0 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -151,7 +151,7 @@ ripng_make_socket (void)
ret = bind (sock, (struct sockaddr *) &ripaddr, sizeof (ripaddr));
if (ret < 0)
{
- zlog (NULL, LOG_ERR, "Can't bind ripng socket: %s.", strerror (errno));
+ zlog (NULL, LOG_ERR, "Can't bind ripng socket: %s.", safe_strerror (errno));
if (ripngd_privs.change (ZPRIVS_LOWER))
zlog_err ("ripng_make_socket: could not lower privs");
return ret;
@@ -224,9 +224,9 @@ ripng_send_packet (caddr_t buf, int bufsize, struct sockaddr_in6 *to,
if (ret < 0) {
if (to)
zlog_err ("RIPng send fail on %s to %s: %s", ifp->name,
- inet6_ntop (&to->sin6_addr), strerror (errno));
+ inet6_ntop (&to->sin6_addr), safe_strerror (errno));
else
- zlog_err ("RIPng send fail on %s: %s", ifp->name, strerror (errno));
+ zlog_err ("RIPng send fail on %s: %s", ifp->name, safe_strerror (errno));
}
return ret;
@@ -1360,7 +1360,7 @@ ripng_read (struct thread *thread)
&hoplimit);
if (len < 0)
{
- zlog_warn ("RIPng recvfrom failed: %s.", strerror (errno));
+ zlog_warn ("RIPng recvfrom failed: %s.", safe_strerror (errno));
return len;
}