From nobody Fri Nov 11 20:33:49 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N89Qj6hspz4fyDh; Fri, 11 Nov 2022 20:33:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N89Qj68L8z4R97; Fri, 11 Nov 2022 20:33:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668198829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tipM8Nx9fst/ylfNRBn60AMociGVnT6C9vyllMoIx5w=; b=VBWwfakAqEk77g5EYPZ+/IE+ijj3oCxA4eQINhIP8yVe1T54ISXL1armWeQfXwu2gJIpbG kuPDk7z/7R3fmWKOoLLeGqn/1B88qlWRwpz77xrBg1U5rwQ7VDNqPYzWd9sxbvPuVNaqQ3 PxdkHFawwRGaG52SlpaHjEEGc1+1Zv2ermTphyhks3Ic969xM6sXWZJqNHBQHppS/qe7K2 Pefd3uTMz6BgRkg0Ic4vDV2vapmVppdJ1/tdWgZ2EGOvbWtxievYsqonpldfmQzUaSfbd7 RjPjyABh75T1JUH9Antnnq2dE2r6jascBLLIOq0UO7+1bJRslsRNMIPeRJDlsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668198829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tipM8Nx9fst/ylfNRBn60AMociGVnT6C9vyllMoIx5w=; b=si3VbInmpT/FXJ448i34puNZvHJazqE7sA/6W/uFLWG0g6wjkNdoPYtfiwl07pYnZRWds2 gaS8t79/tJfVNdpuAp7pYKjgTXpsF/Fxq/03+5BWPw1o0WM5cAAHz2ex4OU9My5oKwr9DV G7q6RgN1MHgRAudni5xPtikyIfG2I2A3lMQMNkwHKIh6bp0AvTX2VgEHY6kSq1wQsIaDaO XoIswBKKAJyP1QbxaKGQwIWfjYUjzclHcyGIopwnzn2IUkTp9MFjn4oiVaApZ75472Ri14 bUqI/vICqSb4fioxPchX4u5ElqhB/WA17Uh7l6Z+mWTxN3Cluj7UkMR93yF5FQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668198829; a=rsa-sha256; cv=none; b=QuS7PZkebxwqhevV4Ttf8QI/qYe1TMMM3fqS3ZSUOy0jKi34VCUzkz5LkCKOlJW4T8YdFV /QBQl4Y3PsAt2VpUA4ZTfAIOixUcxvFbBXj6BXG9tfOMxG4MxFCvG3Y51GL3ODp4AVXKey wWZH+UrP/L7wIXU4/XWYF5yg8FaK+VQJjDGu+Ee9tcbaJvnjZweKtppiWNZU9/ZHjHS0+9 yVc3JJgKiAxvNO6C9BoYgUUYrAMtGJ7d6zosQp7COzGjiL5M0gtDOQJkpHdMSKLRB6dRiH fPORGHmlDhLf2Rknp3sYka8ULGy5J2xThMQpmsY6PDC1UBwdF6A7hYlYFbsxzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4N89Qj5CFrzwxx; Fri, 11 Nov 2022 20:33:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2ABKXnbg076636; Fri, 11 Nov 2022 20:33:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2ABKXnFo076635; Fri, 11 Nov 2022 20:33:49 GMT (envelope-from git) Date: Fri, 11 Nov 2022 20:33:49 GMT Message-Id: <202211112033.2ABKXnFo076635@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Juraj Lutter Subject: git: 37cf0da23dbd - main - security/fragrouter: fix build on BPF-less jails List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: otis X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37cf0da23dbd0c1d91602d25e831a7dc0dde1224 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by otis: URL: https://cgit.FreeBSD.org/ports/commit/?id=37cf0da23dbd0c1d91602d25e831a7dc0dde1224 commit 37cf0da23dbd0c1d91602d25e831a7dc0dde1224 Author: Robert Clausecker AuthorDate: 2022-11-11 20:32:38 +0000 Commit: Juraj Lutter CommitDate: 2022-11-11 20:32:38 +0000 security/fragrouter: fix build on BPF-less jails Such jails don't have /dev/bpf0, making a crucial configure test fail. Fix the configure test to make the build succeed (e.g. on armv7). And while here, also assume MAINTAINER. PR: 267646 --- security/fragrouter/Makefile | 5 ++++- security/fragrouter/files/patch-Libnet-0.99b__configure | 15 ++++++++++++--- .../fragrouter/files/patch-Libnet-0.99b_src_version.c | 9 +++++++++ security/fragrouter/files/patch-attack.c | 10 ++++++++++ security/fragrouter/files/patch-fragrouter.c | 13 +++++++++++++ security/fragrouter/files/patch-list.c | 10 ++++++++++ 6 files changed, 58 insertions(+), 4 deletions(-) diff --git a/security/fragrouter/Makefile b/security/fragrouter/Makefile index 98bec33da963..b9fed3f5c3f7 100644 --- a/security/fragrouter/Makefile +++ b/security/fragrouter/Makefile @@ -1,13 +1,16 @@ PORTNAME= fragrouter PORTVERSION= 1.6 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://monkey.org/~dugsong/ \ + http://fuz.su/~fuz/distfiles/fragrouter/ \ LOCAL/ohauer -MAINTAINER= ports@FreeBSD.org +MAINTAINER= fuz@fuz.su COMMENT= Tool for testing network IDS implementations GNU_CONFIGURE= yes +CFLAGS+= -Wno-pointer-sign PLIST_FILES= sbin/fragrouter \ man/man8/fragrouter.8.gz diff --git a/security/fragrouter/files/patch-Libnet-0.99b__configure b/security/fragrouter/files/patch-Libnet-0.99b__configure index 9ff3b3166c8c..e1beb14d0aed 100644 --- a/security/fragrouter/files/patch-Libnet-0.99b__configure +++ b/security/fragrouter/files/patch-Libnet-0.99b__configure @@ -1,6 +1,6 @@ ---- Libnet-0.99b/configure.orig Mon Jul 26 08:08:51 1999 -+++ Libnet-0.99b/configure Sat Jan 8 01:00:45 2000 -@@ -884,10 +884,6 @@ +--- Libnet-0.99b/configure.orig 1999-07-26 15:08:51 UTC ++++ Libnet-0.99b/configure +@@ -884,10 +884,6 @@ fi @@ -11,3 +11,12 @@ # Check whether --with-pf_packet or --without-pf_packet was given. if test "${with_pf_packet+set}" = set; then +@@ -1192,7 +1188,7 @@ fi + echo $ac_n "checking low-level packet interface type""... $ac_c" 1>&6 + echo "configure:1194: checking low-level packet interface type" >&5 + +-if test -r /dev/bpf0 ; then ++if test -r /usr/include/net/bpf.h ; then + LL_INT_TYPE=bpf + echo "$ac_t""found bpf" 1>&6 + elif test -r /usr/include/net/pfilt.h ; then diff --git a/security/fragrouter/files/patch-Libnet-0.99b_src_version.c b/security/fragrouter/files/patch-Libnet-0.99b_src_version.c new file mode 100644 index 000000000000..55ef79298c35 --- /dev/null +++ b/security/fragrouter/files/patch-Libnet-0.99b_src_version.c @@ -0,0 +1,9 @@ +--- Libnet-0.99b/src/version.c.orig 2022-11-08 17:22:34 UTC ++++ Libnet-0.99b/src/version.c +@@ -44,5 +44,5 @@ __print_vers(void) + /* + * We don't check for error cos we really don't care. + */ +- write(STDOUT_FILENO, banner, sizeof(banner - 1)); ++ write(STDOUT_FILENO, banner, sizeof(banner) - 1); + } diff --git a/security/fragrouter/files/patch-attack.c b/security/fragrouter/files/patch-attack.c new file mode 100644 index 000000000000..dcfa07bb5218 --- /dev/null +++ b/security/fragrouter/files/patch-attack.c @@ -0,0 +1,10 @@ +--- attack.c.orig 2022-11-08 17:21:47 UTC ++++ attack.c +@@ -40,6 +40,7 @@ + + #ifdef STDC_HEADERS + #include ++#include + #endif + #include + #include "attack.h" diff --git a/security/fragrouter/files/patch-fragrouter.c b/security/fragrouter/files/patch-fragrouter.c new file mode 100644 index 000000000000..173cac0f2c04 --- /dev/null +++ b/security/fragrouter/files/patch-fragrouter.c @@ -0,0 +1,13 @@ +--- fragrouter.c.orig 2022-11-08 17:15:14 UTC ++++ fragrouter.c +@@ -104,8 +104,8 @@ usage(void) + int + main(int argc, char *argv[]) + { +- char c, ebuf[BUFSIZ], hops[BUFSIZ], *dev = NULL; +- int num = 0, type = -1, hopptr = 4; ++ char ebuf[BUFSIZ], hops[BUFSIZ], *dev = NULL; ++ int c, num = 0, type = -1, hopptr = 4; + attack_handler attack; + + hops[0] = '\0'; diff --git a/security/fragrouter/files/patch-list.c b/security/fragrouter/files/patch-list.c new file mode 100644 index 000000000000..636963b37431 --- /dev/null +++ b/security/fragrouter/files/patch-list.c @@ -0,0 +1,10 @@ +--- list.c.orig 2022-11-08 17:16:08 UTC ++++ list.c +@@ -40,6 +40,7 @@ + + #ifdef STDC_HEADERS + #include ++#include + #endif + + #include "list.h"