Darren Reed wrote:
> Is this to build IPFilter as an LKM or into the kernel?
Into the kernel.

I've been following the instructions as per INSTALL.FreeBSD:-

1. make freebsd6  (Not in the file, but the Makefile references it, so...)

2. make install-bsd

3. FreeBSD/kinstall

This is where it falls over first:-

[EMAIL PROTECTED] /tmp/ip_fil4.1.26]# FreeBSD/kinstall
Installing ip_auth.c ip_auth.h ip_fil.c ip_fil.h ip_frag.c ip_frag.h
ip_nat.c ip
_nat.h ip_pool.c ip_pool.h ip_proxy.c ip_proxy.h ip_scan.c ip_scan.h
ip_state.c
ip_state.h ip_sync.c ip_sync.h fil.c ip_ftp_pxy.c ip_h323_pxy.c
ip_ipsec_pxy.c i
p_irc_pxy.c ip_netbios_pxy.c ip_pptp_pxy.c ip_raudio_pxy.c ip_rcmd_pxy.c
ip_rpcb
_pxy.c ip_compat.h ip_log.c
Patching /sys/i386/i386/conf.c
Hmm...  Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** conf.c.orig        Sun Jan 14 15:39:32 1996
|--- conf.c     Sun Jan 14 15:48:21 1996
--------------------------
File to patch:

Naturally enough their is no conf.c, and making the assumption this is
autoconf.c, however it fails to apply cleanly there.  Going over the
script by hand and working through things doesn't really help either.

At this point, userland is at 4.1.26 while the kernel is at 4.1.13.  An
awful lot of mucking about and a copy of the ip_fil4.1.26/* to
/sys/contrib/ipfilter/netinet/  (or rather
/usr/src/sys/contrib/ipfilter/netinet/), and a make
clean/buildkernel/installkernel, and it sort of works.

As a side note, I've been doing a FreeBSD kernel build as per
/usr/src/Makefile:-

make clean
make buildkernel KERNCONF=GENERIC
make installkernel KERNCONF=GENERIC

Should I avoid the kernel install and go for the LKM instead?  I'm sure
that it's down to a set of instructions but, it would be nice to be able
to follow this to the letter, and have it work.  I'm also about to try
this under amd64, and anticipate issues already...

Thanks,

Warren



>
> The directions should read like this:
>        0. Run "config GENERIC" or similar in /sys/i386/conf or the
>           appropriate directory for your kernel.
>
>        1. Build IPFilter for FreeBSD:
>                make freebsd
>
>        2. do "make install-bsd"
>           (probably has to be done as root)
>
>        3. Run "BSD/kupgrade"
>
>        4. build a new kernel
>
>        5. install and reboot with the new kernel
>
>        6. use modload(8)/kldload(8) to load the packet filter with:
>                modload if_ipl.o
>                kldload ipf.ko
>
>        7. do "modstat" or "kldstat" to confirm that it has been loaded
>           successfully.
>
> Does this work for you?
> At what point do you run into problems?
>
> You should also be able to do "make freebsd", "make install-bsd" and
> rename ipf.ko to ipl.ko in /boot/kernel to get where you want, unless
> there are some config options from your kernel config file that you
> want to apply.
>
> Darren
>

Reply via email to