tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: MPLS patches



On Thu, Jan 03, 2008 at 05:53:54PM +0200, Mihai Chelaru wrote:
> Hi,
> 
> I've uploaded at ftp://ftp.netbsd.org/pub/NetBSD/misc/kefren/mpls/ 
> patches for -current (of about one week ago) I use in order to get MPLS 
> working(kernel and LDP daemon). I'd like to commit that sooner better 
> than later :)

I have a couple more comments.

MPLS decap/encap appears to be intricately entwined with ether_output,
ip_output, ip_input, et cetera.  That doesn't seem right.  Instead, I
think that there should be a pseudo-interface, mpls0, whose input/output
routines do decap/encap, respectively.  This de-clutters the IPv4/IPv6
stacks and the ethernet code, and it provides a location for tapping
packets with tcpdump before encapsulation and after decapsulation.

There are several fragments of code like this,

        if (m->m_len < sizeof (struct ip) &&
            (m = m_pullup(m, sizeof(struct ip))) == NULL)
                return ENOBUFS;

that should be written like this,

        if (M_UNWRITABLE(m, sizeof(struct ip)) &&
            (m = m_pullup(m, sizeof(struct ip))) == NULL)
                return ENOBUFS;

instead.

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933 ext 24



Home | Main Index | Thread Index | Old Index