Subject: Re: kern/1515 [Re: PR-7148 (causes kernel panic)]
To: Christos Zoulas <christos@zoulas.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-net
Date: 11/10/1999 15:44:59
On Sun, Nov 07, 1999 at 08:57:35PM +0000, Christos Zoulas wrote:
> Can't you just add another mbuf to the chain? Maybe using M_PREPEND?

I'm not familiar with the code but it seems that rt_msg1 *has to* return a
single mbuf: it checks at 2 places if we have more than on mbuf and bail if we
do.
        if (len > MHLEN)
                panic("rt_msg1");
and later
        if (m->m_pkthdr.len != len) {
                m_freem(m);
                return (NULL);
        }

Code that calls rt_msg1 then does things like:
        rtm = mtod(m, struct rt_msghdr *);
        rtm->rtm_flags = RTF_DONE | flags;
        rtm->rtm_errno = error;
        rtm->rtm_addrs = rtinfo->rti_addrs;
        ....

I guess it should be possible to use m_copyback() at this point, but I 
fear other places in the routing socket data path assumes single mbuf too.

Comments ?


--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--