summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorpaul <paul>2005-04-05 00:45:23 +0000
committerpaul <paul>2005-04-05 00:45:23 +0000
commit3d1dc85765816a92f06e0b11f52411dac0f8abae (patch)
treed20333a4ddbc271e11998834a4fdbc0e3acd719d /zebra
parent5b0875287206a0ac1ebe1dca1f6235b8f3df1764 (diff)
2004-04-05 Paul Jakma <paul@dishone.st>
* lib/vty.c: Improve logging of failures to open vty socket(s). See bugid #163. * zebra/zserv.c: print more helpful errors when we fail to successfully bind and listen on zserv socket. Closes bugzilla #163.
Diffstat (limited to 'zebra')
-rw-r--r--zebra/ChangeLog5
-rw-r--r--zebra/zserv.c21
2 files changed, 20 insertions, 6 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog
index 1d0f1754..55e290c0 100644
--- a/zebra/ChangeLog
+++ b/zebra/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-05 Paul Jakma <paul@dishone.st>
+
+ * zserv.c: print more helpful errors when we fail to successfully
+ bind and listen on zserv socket. Closes bugzilla #163.
+
2005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* if_ioctl.c: (interface_list_ioctl) Use if_get_by_name_len.
diff --git a/zebra/zserv.c b/zebra/zserv.c
index caebe490..a34e214a 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -1360,7 +1360,8 @@ zebra_serv ()
if (accept_sock < 0)
{
- zlog_warn ("Can't bind to socket: %s", safe_strerror (errno));
+ zlog_warn ("Can't create zserv stream socket: %s",
+ safe_strerror (errno));
zlog_warn ("zebra can't provice full functionality due to above error");
return;
}
@@ -1383,7 +1384,8 @@ zebra_serv ()
sizeof (struct sockaddr_in));
if (ret < 0)
{
- zlog_warn ("Can't bind to socket: %s", safe_strerror (errno));
+ zlog_warn ("Can't bind to stream socket: %s",
+ safe_strerror (errno));
zlog_warn ("zebra can't provice full functionality due to above error");
close (accept_sock); /* Avoid sd leak. */
return;
@@ -1395,7 +1397,8 @@ zebra_serv ()
ret = listen (accept_sock, 1);
if (ret < 0)
{
- zlog_warn ("Can't listen to socket: %s", safe_strerror (errno));
+ zlog_warn ("Can't listen to stream socket: %s",
+ safe_strerror (errno));
zlog_warn ("zebra can't provice full functionality due to above error");
close (accept_sock); /* Avoid sd leak. */
return;
@@ -1427,7 +1430,9 @@ zebra_serv_un (const char *path)
sock = socket (AF_UNIX, SOCK_STREAM, 0);
if (sock < 0)
{
- perror ("sock");
+ zlog_warn ("Can't create zserv unix socket: %s",
+ safe_strerror (errno));
+ zlog_warn ("zebra can't provide full functionality due to above error");
return;
}
@@ -1444,7 +1449,9 @@ zebra_serv_un (const char *path)
ret = bind (sock, (struct sockaddr *) &serv, len);
if (ret < 0)
{
- perror ("bind");
+ zlog_warn ("Can't bind to unix socket %s: %s",
+ path, safe_strerror (errno));
+ zlog_warn ("zebra can't provide full functionality due to above error");
close (sock);
return;
}
@@ -1452,7 +1459,9 @@ zebra_serv_un (const char *path)
ret = listen (sock, 5);
if (ret < 0)
{
- perror ("listen");
+ zlog_warn ("Can't listen to unix socket %s: %s",
+ path, safe_strerror (errno));
+ zlog_warn ("zebra can't provide full functionality due to above error");
close (sock);
return;
}