Subject: Re: rip_ctloutput() and IP_HDRINCL
To: Matt Thomas <matt@3am-software.com>
From: Markus Mayer <mmayer@redback.com>
List: tech-kern
Date: 11/27/2007 13:45:35
Matt Thomas wrote:
> 
> On Nov 27, 2007, at 12:15 PM, Markus Mayer wrote:
> 
>> The "work around" code snippet should of course look like this, not 
>> like previously posted:
>>
>>     case IP_HDRINCL:
>>         if (*m == 0 || (*m)->m_len < sizeof (int))
>>             error = EINVAL;
>>         else {
>>             if (m->m_len == sizeof(int) &&
>>                 *mtod(*m, int *))
>>                 inp->inp_flags |= INP_HDRINCL;
>>             else if (m->m_len == sizeof(long) &&
>>                 *mtod(*m, long *))
>>                 inp->inp_flags |= INP_HDRINCL;
>>             else
>>                 inp->inp_flags &= ~INP_HDRINCL;
>>         }
> 
> How about changing m_len < sizeof(int) to != ?

That's what I am suggesting in my first e-mail as the better of the two 
solutions. I also included a patch that does just that in my first e-mail.

Looks like my two e-mails got sent in reverse order by the mailing list 
software, so you probably read my second e-mail first.

Regards,
-Markus

-- 
Markus Mayer
Redback Networks
An Ericsson Company