summaryrefslogtreecommitdiff
path: root/ripd/ripd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripd/ripd.c')
-rw-r--r--ripd/ripd.c4
1 files changed, 3 insertions, 1 deletions
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))