Subject: Re: does gif(4) do RFC 2003 IPv4-in-IPv4 encapsulation?
To: NetBSD Networking Technical Discussion List <tech-net@netbsd.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-net
Date: 03/13/2002 17:49:26
On Mon, 04 Mar 2002, Greg A. Woods wrote:
> Does 'gif' really do encapsulation is according to RFC 2003?

Yes, I think so, based on code inspection.  It appears that
in_gif_output() in netinet/in_gif.c sets proto = IPPROTO_IPV4 in
the outer header when the inner packet has address family AF_INET.
IPPROTO_IPV4 is defined as 4, which is the right value for RFC2003
compatibility.

I have submitted a PR with a man page update.

--apb (Alan Barrett)