Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2000 13:31:27 -0800 (PST)
From:      Archie Cobbs <archie@whistle.com>
To:        wollman@khavrinen.lcs.mit.edu (Garrett Wollman)
Cc:        julian@elischer.org, ales@megared.net.mx, net@FreeBSD.ORG
Subject:   Re: GRE Support in 4.X ???
Message-ID:  <200003012131.NAA71857@bubba.whistle.com>
In-Reply-To: <200003012104.QAA64880@khavrinen.lcs.mit.edu> from Garrett Wollman at "Mar 1, 2000 04:04:38 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Garrett Wollman writes:
> > Sorry, I don't understand your point here. What does TCP
> > have to do with anything?
> 
> Look at the code for a moment:
> 
>     if (ntohl(gre->type) != GRE_PROTOCOL_TYPE) {
>         rip_input(m, iphlen);
>         return;
>     }
> 
> So, if it's not the protocol we're expecting, we just punt it to the
> SOCK_RAW interface.
> 
>     len = m->m_len - len;
>     if (ip->ip_len != len) {
>         if (len > ip->ip_len || len < sizeof(struct ip)) {
>             m_freem(m);
>             return;
>         }
>         m_adj(m, iphlen + sizeof(struct gre));
>     }
>     ip_input(m);
> 
> Otherwise, decapsulate the packet and hand it directly to the IP layer
> to be acted upon as if it had been received directly.  The user then
> configures IPFIREWALL_FORWARD to send the packet to lo0 where it gets
> interpreted by the local protocol stack.

What is your opinion about adding GRE support to the kernel?
I.e., should we do it and if so how should it work?

Should a process "bind" to a specific protocol? Should certain
protocols that are already defined (like the above encapsulation)
be handled automatically? Etc..

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




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