Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 May 2019 11:53:59 -0600
From:      Cy Schubert <Cy.Schubert@cschubert.com>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        Kristof Provost <kp@FreeBSD.org>, Slawa Olhovchenkov <slw@zxy.spb.ru>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r347410 - in head: . sys/amd64/conf  sys/arm/conf sys/arm64/conf sys/i386/conf sys/powerpc/conf  sys/riscv/conf sys/sparc64/conf
Message-ID:  <201905111753.x4BHrxUA009032@slippy.cwsent.com>
In-Reply-To: Message from Andrew Gallatin <gallatin@cs.duke.edu> of "Sat, 11 May 2019 09:37:12 -0400." <0c6911b6-6fa0-74cd-8999-c628bc3b2a9d@cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <0c6911b6-6fa0-74cd-8999-c628bc3b2a9d@cs.duke.edu>, Andrew 
Gallatin
writes:
> On 2019-05-10 11:50, Kristof Provost wrote:
> > On 10 May 2019, at 8:31, Andrew Gallatin wrote:
> > 
> >     On 2019-05-10 08:44, Slawa Olhovchenkov wrote:
> > 
> >         pf have ifdef for IPSEC, but don't have support IPSEC_SUPPORT
> >         (netpfil/pf/if_pfsync.c).
> > 
> >     Thanks for pointing this out. It seems like IPSEC_SUPPORT would work
> >     for this. I've made a patch, and it compiles and the pf module loads.
> >     However, I have no knowledge of how to test it. Is this something
> >     that you use, and which you can test?
> > 
> > I suspect this code has not actually been enabled for a long time.
> > gettdb() doesn’t actually appear to be defined anywhere, so I wouldn’t 
> > expect it to ever compile.
> > 
> > gettdb() does exist in OpenBSD, so my current guess is that this is just 
> > an import artefact, and we should |#ifdef OPENBSD| it or something, or 
> > just remove it completely.
> > 
> > For completeness, and because I never shut up about this: to test pf 
> > |kldload pfsync|, |cd /usr/tests/sys/netpfil/pf| and |sudo kyua test|
> > 
> > There’s more information in the current edition of the FreeBSD journal.
> > 
> > Regards,
> > Kristof
> > 
>
> Thanks, you are correct.  Including options_ipsec.h reveals that the 
> code does not even compile (cannot find gettdb(), which does not appear 
> to be defined anywhere in our tree).
>
> Given that it is dead code, I'd rather just not touch it.

IP Filter zeros out the pointer to rcvif when IPSEC is compiled in. 
Looking at the upstream code, Darren checks for IPSEC only for BSD 
based kernels. Zeroing out the pointer only when IPSEC is compiled in, 
regardless whether the mbuf in question was touched by IPSEC or not 
seems a little sketchy to me. However I'm inclined to use IPSEC_SUPPORT 
for now until it can be established whether to keep or remove it.


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.





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