pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net/lldpd
Module Name: pkgsrc
Committed By: hauke
Date: Wed Dec 1 19:18:57 UTC 2021
Modified Files:
pkgsrc/net/lldpd: Makefile distinfo
Added Files:
pkgsrc/net/lldpd/patches: patch-src_daemon_interfaces-bsd.c
Log Message:
Apply upstream's patch to <https://github.com/lldpd/lldpd/issues/489>
"bridge0 is a bridge too big. Please, report the problem"
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 pkgsrc/net/lldpd/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/net/lldpd/distinfo
cvs rdiff -u -r0 -r1.3 \
pkgsrc/net/lldpd/patches/patch-src_daemon_interfaces-bsd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/net/lldpd/Makefile
diff -u pkgsrc/net/lldpd/Makefile:1.37 pkgsrc/net/lldpd/Makefile:1.38
--- pkgsrc/net/lldpd/Makefile:1.37 Tue Nov 30 11:26:33 2021
+++ pkgsrc/net/lldpd/Makefile Wed Dec 1 19:18:56 2021
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.37 2021/11/30 11:26:33 hauke Exp $
+# $NetBSD: Makefile,v 1.38 2021/12/01 19:18:56 hauke Exp $
DISTNAME= lldpd-1.0.13
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= http://media.luffy.cx/files/lldpd/
@@ -58,6 +59,9 @@ INSTALLATION_DIRS+= ${EGDIR} share/doc
INSTALLATION_DIRS+= share/bash-completion/completions
INSTALLATION_DIRS+= share/zsh/site-functions
+# Ownership and permission conflict with useradd?
+#OWN_DIRS+= ${LLDPD_HOME}
+
TEST_TARGET= check
.include "options.mk"
Index: pkgsrc/net/lldpd/distinfo
diff -u pkgsrc/net/lldpd/distinfo:1.18 pkgsrc/net/lldpd/distinfo:1.19
--- pkgsrc/net/lldpd/distinfo:1.18 Tue Nov 30 11:26:33 2021
+++ pkgsrc/net/lldpd/distinfo Wed Dec 1 19:18:56 2021
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.18 2021/11/30 11:26:33 hauke Exp $
+$NetBSD: distinfo,v 1.19 2021/12/01 19:18:56 hauke Exp $
BLAKE2s (lldpd-1.0.13.tar.gz) = c1a02e3d95101ddd0a8d2998172a81dd5af269f96ab730bf999d6d25508df60c
SHA512 (lldpd-1.0.13.tar.gz) = b78440622882a822c9114c3617323ac3c8ce759040bb5b8a9f7357ca20e2993ab0130ee9ad85f65d5f38996665d599d70bbb9dd202e2557035e98545a4304aef
Size (lldpd-1.0.13.tar.gz) = 1973988 bytes
+SHA1 (patch-src_daemon_interfaces-bsd.c) = 9088ded4f3e87fd700587811e9c89878e2de3936
SHA1 (patch-src_daemon_lldpd.8.in) = 13f08e48123ae6a3edce43fa465823353955534e
Added files:
Index: pkgsrc/net/lldpd/patches/patch-src_daemon_interfaces-bsd.c
diff -u /dev/null pkgsrc/net/lldpd/patches/patch-src_daemon_interfaces-bsd.c:1.3
--- /dev/null Wed Dec 1 19:18:57 2021
+++ pkgsrc/net/lldpd/patches/patch-src_daemon_interfaces-bsd.c Wed Dec 1 19:18:57 2021
@@ -0,0 +1,47 @@
+$NetBSD: patch-src_daemon_interfaces-bsd.c,v 1.3 2021/12/01 19:18:57 hauke Exp $
+
+Upstream's patch to <https://github.com/lldpd/lldpd/issues/489>
+"bridge0 is a bridge too big. Please, report the problem"
+
+--- src/daemon/interfaces-bsd.c.orig 2021-09-22 07:17:57.000000000 +0000
++++ src/daemon/interfaces-bsd.c
+@@ -72,11 +72,19 @@ ifbsd_check_bridge(struct lldpd *cfg,
+ struct interfaces_device_list *interfaces,
+ struct interfaces_device *master)
+ {
+- struct ifbreq req[64];
+- struct ifbifconf bifc = {
+- .ifbic_len = sizeof(req),
+- .ifbic_req = req
+- };
++ static size_t ifbic_len = 64;
++ struct ifbreq *req = NULL;
++ struct ifbifconf bifc = {};
++
++ retry_alloc:
++ if ((req = realloc(req, ifbic_len)) == NULL) {
++ log_warn("interfaces", "unable to allocate memory to query bridge %s",
++ master->name);
++ free(bifc.ifbic_req);
++ return;
++ }
++ bifc.ifbic_len = ifbic_len;
++ bifc.ifbic_req = req;
+
+ #if defined HOST_OS_FREEBSD || defined HOST_OS_NETBSD || defined HOST_OS_OSX || defined HOST_OS_DRAGONFLY
+ struct ifdrv ifd = {
+@@ -101,11 +109,9 @@ ifbsd_check_bridge(struct lldpd *cfg,
+ #else
+ # error Unsupported OS
+ #endif
+- if (bifc.ifbic_len >= sizeof(req)) {
+- log_warnx("interfaces",
+- "%s is a bridge too big. Please, report the problem",
+- master->name);
+- return;
++ if (bifc.ifbic_len >= ifbic_len) {
++ ifbic_len = bifc.ifbic_len + 1;
++ goto retry_alloc;
+ }
+ for (int i = 0; i < bifc.ifbic_len / sizeof(*req); i++) {
+ struct interfaces_device *slave =
Home |
Main Index |
Thread Index |
Old Index