diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2004-11-22 04:33:32 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2004-11-22 04:33:32 +0000 |
commit | a32bc346c6b53e49fb963fe092da39dc00db5c71 (patch) | |
tree | 06d91b51e4c847f2888b1c369f7acc7eafe514f6 /net/quagga/files | |
parent | * Instead of using Xvfb, and evil black magic to create the extensions (diff) |
Attached patch comes from official quagga developer list. It fixes
the problem with bgpd lockup when remote peer dies. Patch is tested
by many people. Here is also some cleanup to Makefile to remove
unused variable. Please commit it.
Submitted by: Boris Kovalenko <boris@ntmk.ru>
Notes
Notes:
svn path=/head/; revision=122117
Diffstat (limited to 'net/quagga/files')
-rw-r--r-- | net/quagga/files/patch-bgpd::bgp_packet.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/net/quagga/files/patch-bgpd::bgp_packet.c b/net/quagga/files/patch-bgpd::bgp_packet.c new file mode 100644 index 000000000000..c54a139301a7 --- /dev/null +++ b/net/quagga/files/patch-bgpd::bgp_packet.c @@ -0,0 +1,25 @@ +--- bgpd/bgp_packet.c.orig Mon Nov 22 15:31:07 2004 ++++ bgpd/bgp_packet.c Mon Nov 22 15:31:40 2004 +@@ -566,17 +566,22 @@ + while (1) + { + int writenum; ++ int val; + + s = bgp_write_packet (peer); + if (! s) + return 0; + ++ val = fcntl (peer->fd, F_GETFL, 0); ++ fcntl (peer->fd, F_SETFL, val|O_NONBLOCK); ++ + /* Number of bytes to be sent. */ + writenum = stream_get_endp (s) - stream_get_getp (s); + + /* Call write() system call. */ + num = write (peer->fd, STREAM_PNT (s), writenum); + write_errno = errno; ++ fcntl (peer->fd, F_SETFL, val); + if (num <= 0) + { + /* Partial write. */ |