IPDIVERT

Max Khon fjoe at iclub.nsu.ru
Wed Apr 30 02:03:01 PDT 2003


hi, there!

On Wed, Apr 30, 2003 at 12:42:45AM -0700, Luigi Rizzo wrote:

> > > > I have a suggestion to build GENERIC and ipfw.ko with IPDIVERT by default
> > > > or change IPDIVERT to NOIPDIVERT and build boot kernels with NOIPDIVERT.
> > > > The main goal is to allow to use NAT with stock kernels and ipfw.ko.
> ...
> > AFAIK there is no possibility to add IPPROTO_DIVERT dynamically to
> > inetsw[]. Some fields of 'struct ipq' are under #ifdef IPDIVERT as well.
> > ipfw code under #ifdef IPDIVERT are just `case' labels and strings in printf's
> > (like "ipdivert enabled"). In other words is it really
> > worth splitting ipdivert into separate .ko module? Changing IPDIVERT to
> > NOIPDIVERT will be cleaner in my opinion.
> 
> indeed, i believe we should make the main part of IPDIVERT processing
> (in ip_input.c, ip_output.c, ip_fw2.c and ip_var.h) non-optional
> (this would also allow a better realignment of fields in struct ipq) 
> and only make the code in ip_divert.c a module

ok, how can I add IPPROTO_DIVERT dynamically?
Is it ok to have dummy usrreqs there and to overwrite IPPROTO_DIVERT
array element upon module load/unload?

/fjoe



More information about the freebsd-net mailing list