summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2004-11-22 04:33:32 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2004-11-22 04:33:32 +0000
commita32bc346c6b53e49fb963fe092da39dc00db5c71 (patch)
tree06d91b51e4c847f2888b1c369f7acc7eafe514f6 /net
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')
-rw-r--r--net/quagga/Makefile4
-rw-r--r--net/quagga/files/patch-bgpd::bgp_packet.c25
2 files changed, 26 insertions, 3 deletions
diff --git a/net/quagga/Makefile b/net/quagga/Makefile
index 8c404b02f2a0..0b79dc2549c3 100644
--- a/net/quagga/Makefile
+++ b/net/quagga/Makefile
@@ -7,7 +7,7 @@
PORTNAME= quagga
PORTVERSION= 0.96.5
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= http://quagga.net/download/
@@ -90,8 +90,6 @@ RC_DIR= ${PREFIX}/etc/rc.d
RC_SUFX= .sh
.endif
-QUAGGA_SCRIPTS= zebra ripd ripngd ospfd ospf6d bgpd
-
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%SYSCONF_DIR%%,${SYSCONF_DIR},g' \
-e 's,%%LOCALSTATE_DIR%%,${LOCALSTATE_DIR},g' \
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. */