aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2004-11-22 12:33:32 +0800
committeredwin <edwin@FreeBSD.org>2004-11-22 12:33:32 +0800
commit6e356912bb75d73d69470df265f9bfc98caccd10 (patch)
tree3497ab4df06e3196b61bd8faddb9ab2fbed4dbcc /net
parent19945cac1dc8c098bdd851c2fb1b7605f03b6cba (diff)
downloadfreebsd-ports-gnome-6e356912bb75d73d69470df265f9bfc98caccd10.tar.gz
freebsd-ports-gnome-6e356912bb75d73d69470df265f9bfc98caccd10.tar.zst
freebsd-ports-gnome-6e356912bb75d73d69470df265f9bfc98caccd10.zip
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>
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. */