Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jun 2023 14:40:53 +0200
From:      Michael Gmelin <grembo@freebsd.org>
To:        "Herbert J. Skuhra" <herbert@gojira.at>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject:   Re: git: 637c0bace261 - main - sysutils/pftop: Fix build on 14.0-CURRENT
Message-ID:  <20230611144053.7d2ae2b8.grembo@freebsd.org>
In-Reply-To: <25969E38-1EA2-4F9A-8644-AF378AC2E857@freebsd.org>
References:  <87wn0afhdx.wl-herbert@gojira.at> <25969E38-1EA2-4F9A-8644-AF378AC2E857@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On Sun, 11 Jun 2023 12:12:44 +0200
Michael Gmelin <grembo@freebsd.org> wrote:

> > On 11. Jun 2023, at 12:00, Herbert J. Skuhra <herbert@gojira.at>
> > wrote: =EF=BB=BFOn Sun, 11 Jun 2023 11:25:45 +0200, Michael Gmelin wrot=
e: =20
> >>=20
> >>=20
> >>  =20
> >>> On 11. Jun 2023, at 10:27, Herbert J. Skuhra <herbert@gojira.at>
> >>> wrote: On Sat, 10 Jun 2023 12:06:09 +0200,
> >>> Michael Gmelin <grembo@FreeBSD.org> wrote: =20
> >>>> The branch main has been updated by grembo:
> >>>> URL:
> >>>> https://cgit.FreeBSD.org/ports/commit/?id=3D637c0bace26138529a36232e=
948549ad59342ba9
> >>>> commit 637c0bace26138529a36232e948549ad59342ba9 Author:
> >>>> Michael Gmelin <grembo@FreeBSD.org> AuthorDate: 2023-06-10
> >>>> 10:03:39 +0000 Commit:     Michael Gmelin <grembo@FreeBSD.org>
> >>>> CommitDate: 2023-06-10 10:03:39 +0000
> >>>>   sysutils/pftop: Fix build on 14.0-CURRENT
> >>>> ---
> >>>> sysutils/pftop/Makefile                   | 10 ++++++++--
> >>>> sysutils/pftop/files/extra-patch-config.h |  6 +++++-
> >>>> 2 files changed, 13 insertions(+), 3 deletions(-)
> >>>> diff --git a/sysutils/pftop/Makefile b/sysutils/pftop/Makefile
> >>>> index f3c6d879f637..cba2ecd65aeb 100644
> >>>> --- a/sysutils/pftop/Makefile
> >>>> +++ b/sysutils/pftop/Makefile
> >>>> @@ -1,6 +1,6 @@
> >>>> PORTNAME=3D    pftop
> >>>> PORTVERSION=3D    0.8
> >>>> -PORTREVISION=3D    2
> >>>> +PORTREVISION=3D    3
> >>>> CATEGORIES=3D    sysutils net
> >>>> MAINTAINER=3D    grembo@FreeBSD.org
> >>>> @@ -22,7 +22,13 @@ EXTRA_PATCHES+=3D
> >>>> ${FILESDIR}/extra-patch-bpf_dump.c \
> >>>> ${FILESDIR}/extra-patch-sf-gencode.h MAKE_ARGS=3D
> >>>> LOCALBASE=3D"${PREFIX}" \
> >>>> -        OSLEVEL=3D45
> >>>> +
> >>>> +.if ${OPSYS} =3D=3D FreeBSD && ${OSVERSION} >=3D 1400090
> >>>> +MAKE_ARGS+=3D    OSLEVEL=3D46
> >>>> +.else
> >>>> +MAKE_ARGS+=3D    OSLEVEL=3D45
> >>>> +.endif
> >>>> +
> >>>> CFLAGS+=3D    -DHAVE_SNPRINTF=3D1 -DHAVE_VSNPRINTF=3D1 \
> >>>>       -DHAVE_FINE_GRAINED_LOCKING=3D1
> >>>> diff --git a/sysutils/pftop/files/extra-patch-config.h
> >>>> b/sysutils/pftop/files/extra-patch-config.h index
> >>>> 6d2873c42ab1..d24f88179718 100644 ---
> >>>> a/sysutils/pftop/files/extra-patch-config.h +++
> >>>> b/sysutils/pftop/files/extra-patch-config.h @@ -1,7 +1,7 @@
> >>>> $OpenBSD: patch-config_h,v 1.4 2008/12/20 04:36:11 canacar Exp $
> >>>> --- config.h.orig    Tue Nov  6 22:34:18 2007
> >>>> +++ config.h    Fri Dec 19 20:28:01 2008
> >>>> -@@ -74,11 +74,20 @@
> >>>> +@@ -74,11 +74,24 @@
> >>>> #define HAVE_PFSYNC_STATE
> >>>> #endif
> >>>> @@ -11,7 +11,11 @@ $OpenBSD: patch-config_h,v 1.4 2008/12/20
> >>>> 04:36:11 canacar Exp $ +#endif
> >>>> +
> >>>> #ifdef HAVE_PFSYNC_STATE
> >>>> ++#if OS_LEVEL > 45
> >>>> ++typedef struct pfsync_state_1400 pf_state_t; =20
> >>> Are you sure that this is correct?
> >>> If I replace pfsync_state_1400 with pfsync_state_1301 the port
> >>> builds and the output looks sane. =20
> >>=20
> >> Hi, thanks for reporting, could you please add some details (like,
> >> how the output differs)? =20
> >=20
> > With your change:
> >=20
> > sctp   Out (null)[13715]         (null)[0]
> > 0:255             0     *      *      * 237    In  (null)[0]
> >      (null)[0]              NO_TRAFFIC:NO_TRAFFIC      0     0
> > *      * ip     In  (null)[0]             (null)[0]
> > NO_TRAFFIC:NO_TRAFFIC      0 9324h      *      * ip     In
> > (null)[7185]          (null)[512]            NO_TRAFFIC:NO_TRAFFIC
> >     0    53      *  2048G ip     In  (null)[4097]
> > (null)[49408]          NO_TRAFFIC:NO_TRAFFIC      0     0      0
> >   1 ip     In  (null)[9732]          (null)[4992]
> >  9:0               0     0     42 73728M cpnx   In  (null)[0]
> >       (null)[0]                     255:0               0     *
> >  *      * ipenca In  (null)[0]             (null)[0]
> > NO_TRAFFIC:NO_TRAFFIC      0     0      *      * ip     In
> > (null)[0]             (null)[0]                       0:9
> >     *     *      *      *
> >=20
> > Garbage?
> >=20
> > With attached patch I see ipv[46] addresses and port numbers again.
> > :-)
> >=20
> > I am running main-n263493-4e8d558c9d1c.
> >  =20
>=20
> The question is if pftop shouldn=E2=80=99t use pfsync_state_1400, or if t=
here
> is a kernel problem with that struct. I=E2=80=99ll look into it.
>=20
> Thanks

Hi Herbert,

Apparently what happened is that I tested using 1301, which worked,
then changed to 1400, which also seemed to work and committed the
change. Apparently I tested the wrong binary, as rebuilding and testing
I see the same results as you do.

Therefore I'll switch to using 1301, thanks again for reporting.

Best
Michael

--=20
Michael Gmelin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230611144053.7d2ae2b8.grembo>