summaryrefslogtreecommitdiff
path: root/ripd
diff options
context:
space:
mode:
Diffstat (limited to 'ripd')
-rw-r--r--ripd/ChangeLog5
-rw-r--r--ripd/ripd.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ripd/ChangeLog b/ripd/ChangeLog
index 13722805..5a5d1b4b 100644
--- a/ripd/ChangeLog
+++ b/ripd/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * ripd.c: (rip_create_socket) Save errno before calling
+ ripd_privs.change.
+
2005-01-04 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ripd.c: (rip_recvmsg) Use ZCMSG_FIRSTHDR instead of CMSG_FIRSTHDR.
diff --git a/ripd/ripd.c b/ripd/ripd.c
index c5baf8a3..2a345a66 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -2002,9 +2002,11 @@ rip_create_socket ()
ret = bind (sock, (struct sockaddr *) & addr, sizeof (addr));
if (ret < 0)
{
- perror ("bind");
+ int save_errno = errno;
if (ripd_privs.change (ZPRIVS_LOWER))
zlog_err ("rip_create_socket: could not lower privs");
+ zlog_err("cannot bind to port %d: %s",
+ (int)ntohs(addr.sin_port), safe_strerror(save_errno));
return ret;
}
if (ripd_privs.change (ZPRIVS_LOWER))