Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2000 16:04:38 -0500 (EST)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        Archie Cobbs <archie@whistle.com>
Cc:        wollman@khavrinen.lcs.mit.edu (Garrett Wollman), julian@elischer.org (Julian Elischer), ales@megared.net.mx (Alejandro Ramirez), net@FreeBSD.ORG
Subject:   Re: GRE Support in 4.X ???
Message-ID:  <200003012104.QAA64880@khavrinen.lcs.mit.edu>
In-Reply-To: <200003012039.MAA71524@bubba.whistle.com>
References:  <200003012036.PAA64720@khavrinen.lcs.mit.edu> <200003012039.MAA71524@bubba.whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Wed, 1 Mar 2000 12:39:19 -0800 (PST), Archie Cobbs <archie@whistle.com> said:

> 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.

-GAWollman

--
Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same
wollman@lcs.mit.edu  | O Siem / The fires of freedom 
Opinions not those of| Dance in the burning flame
MIT, LCS, CRS, or NSA|                     - Susan Aglukark and Chad Irschick


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?200003012104.QAA64880>