cvs commit: src/sys/netinet ip_fw2.c

Andre Oppermann andre at freebsd.org
Sun Sep 5 16:30:22 PDT 2004


Gleb Smirnoff wrote:
> 
> On Sun, Sep 05, 2004 at 11:58:30PM +0200, Andre Oppermann wrote:
> A> Thanks.  I was at the SUCON'04 the last days and only infrequently checking
> A> my inbox.  The ipfw2 code never returned EINVAL for divert actions when the
> A> IPDIVERT was not compiled in.  I didn't change that with the conversion to
> A> pfil_hooks.
> 
> May be this check was in other place. I clearly remeber that rc.firewall
> on my 4.x boxes produced errors on divert with GENERIC loaded.
> 
> I haven't looked at code but I have just checked:
> 
> root at fade:~:|>ipfw add 65000 divert natd all from any to any
> ipfw: getsockopt(IP_FW_ADD): Invalid argument
> root at fade:~:|>uname -a
> FreeBSD fade.bestcom.ru 4.9-STABLE FreeBSD 4.9-STABLE #3: Mon Jan 12 12:30:42 MSK 2004     root at fade.bestcom.ru:/usr/obj/usr/src/sys/FADE  i386
> 
> (no DIVERT in kernel).

Is that ipfw or ipfw2 (ipfw != ipfw2)?

Anyway, if ipfw behaved this way on 4.x it should continue to do so in 5.x.
So your change is correct.

-- 
Andre


More information about the cvs-src mailing list