NetBSD-Bugs archive

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

Re: kern/38791 (routing socket event header not cleared)



On Mon, Jun 02, 2008 at 12:05:16PM -0700, J.T. Conklin wrote:
> mlelstv%NetBSD.org@localhost writes:
> > Synopsis: routing socket event header not cleared
> >
> > State-Changed-From-To: closed->open
> > State-Changed-By: mlelstv%NetBSD.org@localhost
> > State-Changed-When: Sun, 01 Jun 2008 16:51:01 +0000
> > State-Changed-Why:
> > The patch erases the whole message. Maybe clearing sizeof(rtm) is enough?
> 
> True, however this is essentially the same thing that callers to rt_msg2() 
> do (to they structure they pass) when they build a route event.  Clearing
> the whole message could conceivably fix problems where not all the event/
> message payload data is being being zeroed too (althought this may not be
> likely).
> 
> The total length of these messages are quite small, so any the extra cost
> to zero the whole event should be similarly small.

Let me clarify this: by erasing the message you erase the contents
of the message that has been copied there two lines above with
m_copyback().

E.g. in case of RTM_IFINFO messages you overwrite the whole message
with zeroes and thus break ifwatchd.

Greetings,
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index