diff options
author | ajs <ajs> | 2005-01-30 17:40:29 +0000 |
---|---|---|
committer | ajs <ajs> | 2005-01-30 17:40:29 +0000 |
commit | 798534576c2525476141628ac14ecc83fd775a5a (patch) | |
tree | c5166d696b314ee41961198340b61dd1062af3ec /ripd | |
parent | 0b7d97d293af645d98bc9b196b228d674b2aa344 (diff) |
2005-01-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ripd.c: (rip_create_socket) Save errno before calling
ripd_privs.change.
Diffstat (limited to 'ripd')
-rw-r--r-- | ripd/ChangeLog | 5 | ||||
-rw-r--r-- | ripd/ripd.c | 4 |
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)) |