Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jun 1995 06:01:25 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-hackers@freebsd.org (FreeBSD hackers)
Subject:   Re: packet forwarding
Message-ID:  <199506290401.GAA04444@uriah.heep.sax.de>
In-Reply-To: <199506280731.AAA00673@corbin.Root.COM> from "David Greenman" at Jun 28, 95 00:31:56 am

next in thread | previous in thread | raw e-mail | index | archive | help
As David Greenman wrote:
> 
>    You need to add 'options GATEWAY' to your kernel config file.

You should add, but you don't need to.  GATEWAY is being rarely used
these days (i've removed all occurences of *_GATEWAY from the output,
since they are unrelated):

j@uriah 393% find . -type f -name '*.[ch]' | xargs fgrep GATEWAY
./compile/URIAH/param.c:#ifdef GATEWAY
./compile/URIAH/param.c:#endif /* GATEWAY */
./compile/UNCLE/param.c:#ifdef GATEWAY
./compile/UNCLE/param.c:#endif /* GATEWAY */
./conf/param.c:#ifdef GATEWAY
./conf/param.c:#endif /* GATEWAY */
./i386/boot/dosboot/param.h:#ifdef GATEWAY
./i386/boot/dosboot/param.h:#endif      /* GATEWAY */
./netinet/ip_input.c:#ifdef GATEWAY
./netinet/ip_input.c:#else /* GATEWAY */
./netinet/ip_input.c:#endif /* GATEWAY */

This is from ./netinet/ip_input.c:

#ifndef IPFORWARDING
#ifdef GATEWAY
#define IPFORWARDING    1       /* forward IP packets not for us */
#else /* GATEWAY */
#define IPFORWARDING    0       /* don't forward IP packets not for us */
#endif /* GATEWAY */
#endif /* IPFORWARDING */
...
int     ipforwarding = IPFORWARDING;

So it's only the _default_ that is affected by GATEWAY, you can always
change this via sysctl.

And here the snippet from ./conf/param.c:

/* maximum # of mbuf clusters */
#ifndef NMBCLUSTERS
#ifdef GATEWAY
int     nmbclusters = 512 + MAXUSERS * 16;
#else
int     nmbclusters = 256 + MAXUSERS * 16;
#endif /* GATEWAY */
#else
int     nmbclusters = NMBCLUSTERS;
#endif


Well, seems that it might be recommended to have GATEWAY here, but
it's as well possible to get the same by overriding NMBCLUSTERS.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)



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