git: abeb8cdf5dcf - main - net/libpfctl: fix pfctl_do_ioctl()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Nov 2023 17:53:06 UTC
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/ports/commit/?id=abeb8cdf5dcfaf48559faee63c353ac5ac24c401 commit abeb8cdf5dcfaf48559faee63c353ac5ac24c401 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2023-11-17 13:31:48 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2023-11-17 17:50:54 +0000 net/libpfctl: fix pfctl_do_ioctl() pfctl_do_ioctl() copies the packed request data into the request buffer and then frees it. However, it's possible for the buffer to be too small for the reply, causing us to allocate a new buffer. We then copied from the freed request, and freed it again. Do not free the request buffer until we're all the way done. While updating also include a few other minor bugfixes - handle allocation failure - handle pfctl_do_ioctl() failures better Sponsored by: Rubicon Communications, LLC ("Netgate") --- net/libpfctl/Makefile | 15 +++++++-------- net/libpfctl/distinfo | 24 ++++++++++++------------ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/net/libpfctl/Makefile b/net/libpfctl/Makefile index ef9a02a8241c..6c7d7d234984 100644 --- a/net/libpfctl/Makefile +++ b/net/libpfctl/Makefile @@ -1,5 +1,5 @@ PORTNAME= libpfctl -PORTVERSION= 0.7 +PORTVERSION= 0.8 CATEGORIES= net MASTER_SITES= LOCAL/kp/ @@ -13,7 +13,8 @@ USE_LDCONFIG= yes WRKSRC= ${WRKDIR}/libpfctl -_LIBPFCTL_HASH= 87c503235310 +_LIBPFCTL_HASH= 498934c5ff51 +_LIBPFCTL_REV= 2 PLIST_FILES= \ lib/libpfctl.so \ @@ -25,7 +26,7 @@ PLIST_FILES= \ .if ${OSREL} == "15.0" DISTFILES= libpfctl-${_LIBPFCTL_HASH}.tar.gz .else -DISTFILES= libpfctl-${OSREL}_1.tar.gz +DISTFILES= libpfctl-${OSREL}_${_LIBPFCTL_REV}.tar.gz .endif do-install: @@ -41,15 +42,13 @@ upload: do \ cd /usr/src/lib && \ git archive --format=tar.gz \ - --output=libpfctl-$${version}.tar.gz \ - origin/releng/$${version} libpfctl ; \ + --output=libpfctl-$${version}_${_LIBPFCTL_REV}.tar.gz \ + libpfctl/$${version} libpfctl ; \ done cd /usr/src/lib && \ git archive --format=tar.gz \ --output=libpfctl-${_LIBPFCTL_HASH}.tar.gz \ - ${_LIBPFCTL_HASH} libpfctl ; \ - scp libpfctl-*.tar.gz \ - kp@freefall.freebsd.org:public_distfiles/ + ${_LIBPFCTL_HASH} libpfctl ; .endif .include <bsd.port.post.mk> diff --git a/net/libpfctl/distinfo b/net/libpfctl/distinfo index b73064601463..34aad5682ff5 100644 --- a/net/libpfctl/distinfo +++ b/net/libpfctl/distinfo @@ -1,12 +1,12 @@ -TIMESTAMP = 1699359628 -SHA256 (libpfctl-12.4_1.tar.gz) = d9b20a2705ff113ef68a3d4b8d139d9eed2db11496a3d5ced979473cd00860eb -SIZE (libpfctl-12.4_1.tar.gz) = 10047 -TIMESTAMP = 1699359726 -SHA256 (libpfctl-13.2_1.tar.gz) = 41c647ddd909d106435db4c16187789de5925a098d52c462048aa4cb43887b8d -SIZE (libpfctl-13.2_1.tar.gz) = 10043 -TIMESTAMP = 1699359643 -SHA256 (libpfctl-14.0_1.tar.gz) = 5a43684502ad6ec0ef6b7e77f11c8a5e1b5dc318b30e6c5b8527d1a4f9eb103b -SIZE (libpfctl-14.0_1.tar.gz) = 11619 -TIMESTAMP = 1698836124 -SHA256 (libpfctl-87c503235310.tar.gz) = 8dd8e6a81b78e9af734ec58899f4f2a3090fccccdaa14a8fa5421cde3e995433 -SIZE (libpfctl-87c503235310.tar.gz) = 13383 +TIMESTAMP = 1700228381 +SHA256 (libpfctl-12.4_2.tar.gz) = 261c701d5c41378058aec9566641aa749ea52732916b76371f8eaadcad8e9b36 +SIZE (libpfctl-12.4_2.tar.gz) = 10082 +TIMESTAMP = 1700227662 +SHA256 (libpfctl-13.2_2.tar.gz) = d14b3df105ad3d532f8d5423fc28e94b4d878f2184204cc7c9fb08ab8b3fec95 +SIZE (libpfctl-13.2_2.tar.gz) = 10082 +TIMESTAMP = 1700228315 +SHA256 (libpfctl-14.0_2.tar.gz) = f5a9b99d0e922ffb2d58c9731dba2baccdac8e77ec73b87f3e8e8510933c5b11 +SIZE (libpfctl-14.0_2.tar.gz) = 11665 +TIMESTAMP = 1700229758 +SHA256 (libpfctl-498934c5ff51.tar.gz) = 58b2d78ce0996e54a10574383642e3877217a8a5099f1db3cb15234539a83931 +SIZE (libpfctl-498934c5ff51.tar.gz) = 13462