Date: Wed, 04 Jun 1997 08:38:04 +0100 From: Brian Somers <brian@awfulhak.org> To: MARK SAYER <MSAYER@cuscal.com.au> Cc: "'freebsd-hackers@freebsd.org'" <freebsd-hackers@FreeBSD.ORG> Subject: Re: IPPROTO_IPDIVERT undeclared error in natd Message-ID: <199706040738.IAA06107@awfulhak.demon.co.uk> In-Reply-To: Your message of "Wed, 04 Jun 1997 11:04:42 %2B1000." <199706040107.SAA06532@hub.freebsd.org>
index | next in thread | previous in thread | raw e-mail
> I'm happy to say that I am making progress with this...but still having
> trouble. Trying to make the natd binaries..I finally got my in_cksum.h
> and got passed that hurdle....but now I am getting an undeclared error
> in the natd.c source. I get the following error at compilation:
>
> ===> alias
>
> ===> natd
>
> cc -O -Wall -g -I../alias -c natd.c
>
> natd.c: In function `main':
>
> natd.c:178: `IPPROTO_DIVERT' undeclared (first use this function)
>
> natd.c:178: (Each undeclared identifier is reported only once
>
> natd.c:178: for each function it appears in.)
>
> *** Error code 1
>
>
>
> Stop.
>
> *** Error code 1
>
>
>
> Stop.
>
> This is the source code that is referring to IPPROTO_IPDIVERT
>
> /*
>
> * Create divert sockets. Use only one socket if -p was specified
>
> * on command line. Otherwise, create separate sockets for
>
> * outgoing and incoming connnections.
>
> */
>
> if (inOutPort) {
>
>
>
> divertInOut = socket (PF_INET, SOCK_RAW,
> IPPROTO_DIVERT);
> if (divertInOut == -1)
>
> Quit ("Unable to create divert socket.");
>
>
>
> divertIn = -1;
>
> divertOut = -1;
>
> Where should this have been declared? I have recompiled my kernel with
> the IP_FIREWALL And IP_DIVERT options and am running Walnut Creek
> FreeBSD 2.1.6-RELEASE #0
natd doesn't work in 2.1.*. The divert stuff wasn't stable enough.
Certainly, if there was divert stuff there back then, the -p option
doesn't work - you need the -i & -o options instead (there was a problem
with the divert loopback avoidance code).
> Mark.
I'd suggest going to at least 2.2.1 if you want natd, otherwise
use ppp -alias if you're masquerading on a serial interface.
--
Brian <brian@awfulhak.org>, <brian@freebsd.org>
<http://www.awfulhak.org>
Don't _EVER_ lose your sense of humour....
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706040738.IAA06107>
