aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorOlivier Cochard <olivier@FreeBSD.org>2020-07-24 20:21:32 +0000
committerOlivier Cochard <olivier@FreeBSD.org>2020-07-24 20:21:32 +0000
commitff49eb4e23db1598977f612d32e6edc5c5f069b8 (patch)
tree904740129680c9c7f1932f7e94b80f714b198181 /net
parenta8c8f5164a9707e7cbeb9f579653fd53aa21729c (diff)
downloadports-ff49eb4e23db1598977f612d32e6edc5c5f069b8.tar.gz
ports-ff49eb4e23db1598977f612d32e6edc5c5f069b8.zip
Fix crash on config read
PR: 248249 Submitted by: pi Reported by: Raul Munos <raul.munoz@custos.es>, Juraj Lutter <juraj@lutter.sk>
Notes
Notes: svn path=/head/; revision=543378
Diffstat (limited to 'net')
-rw-r--r--net/frr7/Makefile1
-rw-r--r--net/frr7/files/patch-lib_zlog.c16
2 files changed, 17 insertions, 0 deletions
diff --git a/net/frr7/Makefile b/net/frr7/Makefile
index eb26c859ed20..db8e532c90e0 100644
--- a/net/frr7/Makefile
+++ b/net/frr7/Makefile
@@ -3,6 +3,7 @@
PORTNAME= frr
PORTVERSION= 7.4
DISTVERSIONPREFIX= frr-
+PORTREVISION= 1
CATEGORIES= net
.if defined(PYTHONTOOLS)
PKGNAMESUFFIX= 7-pythontool
diff --git a/net/frr7/files/patch-lib_zlog.c b/net/frr7/files/patch-lib_zlog.c
new file mode 100644
index 000000000000..50f34b7eea56
--- /dev/null
+++ b/net/frr7/files/patch-lib_zlog.c
@@ -0,0 +1,16 @@
+--- lib/zlog.c.orig 2020-06-30 11:08:57 UTC
++++ lib/zlog.c
+@@ -246,10 +246,10 @@ void zlog_tls_buffer_init(void)
+ fchown(mmfd, zlog_uid, zlog_gid);
+
+ #ifdef HAVE_POSIX_FALLOCATE
+- if (posix_fallocate(mmfd, 0, TLS_LOG_BUF_SIZE) < 0) {
+-#else
+- if (ftruncate(mmfd, TLS_LOG_BUF_SIZE) < 0) {
++ if (posix_fallocate(mmfd, 0, TLS_LOG_BUF_SIZE) != 0)
++ /* note next statement is under above if() */
+ #endif
++ if (ftruncate(mmfd, TLS_LOG_BUF_SIZE) < 0) {
+ zlog_err("failed to allocate thread log buffer \"%s\": %s",
+ mmpath, strerror(errno));
+ goto out_anon_unlink;